真正零基础学习HTML(四)-创新互联

盒子模型
css基本属性:
1.border:边框 solid:实线颜色
2.width:宽
3.height:高
4.background-image:url()背景图片
background-repeat-x/y/no:水平重复或不重复
滚动:background-attachment:fixtd(固定)scroll(背景图片默认滚动)
background-position:left(水平)top(垂直);

创新互联建站主营益阳网站建设的网络公司,主营网站建设方案,App定制开发,益阳h5小程序设计搭建,益阳网站营销推广欢迎益阳等地区企业咨询

字体属性
1.大小: 单位:px,pd
2.样式:font-style: oblique;(偏斜体) 、italic;(斜体) 、normal;(正常)
3.行高:line-height: normal;(正常) 单位:PX、PD、EM;
4.组合在一起,实现文本垂直居中 height: 40px;/测试attachment是请务必修改高度/line-height: 40px;
5.粗细:font-weight: bold;(粗体) 、lighter;(细体) 、normal;(正常)
6.变体:font-variant: small-caps;(小型大写字母) 、normal;(正常)
7.大小写:text-transform: capitalize;(首字母大写) 、uppercase;(大写) 、lowercase;(小写) 、none;(无)
8.修饰:text-decoration: underline;(下划线) 、overline;(上划线) 、line-through;(删除线) 、blink;(闪烁)
9.常用字体:(font-family):“Courier New”, Courier, monospace, “Times New Roman”, Times, serif, Arial, Helvetica, sans-serif, Verdana

鼠标样式
1.cursor:point小手
2.move十字
3.wait沙漏/转圈
4.help问号

区块属性
1.div块级(独占一行) span内联
2.对齐:text-align: justify;(两端对齐) left;(左对齐) right;(右对齐) center;(居中)
3.缩进:text-indent: 数值px;text-indent: 2em; text-indent: 20px;
4.垂直对齐:vertical-align: baseline;(基线) sub;(下标) super;(上标) top; text-top; middle; bottom; text-bottom;
5.词间距:word-spacing: normal; 数值
6.空格:white-space: pre;(保留) nowrap;(不换行)--


7.显示:display:block;(块) inline;(内嵌) list-item;(列表项) run-in;(追加部分) compact;(紧凑) marker;(标记) table; inline-table; table-raw-group; table-header-group; table-footer-group; table-raw; table-column-group; table-column; table-cell; table-caption;(表格标题);

盒子模型

1.border:10px solid red 边框
2.padding:20px 边框和内容间距
3.内容+填充padding+边框+外边距
4.margin:盒子和盒子距离

5.padding:上右下左(顺时针)20px 10px 15px 5px
padding:20px(上下) 10px(左右)
padding:20px(上) 10px(左右) 5px(下)

6.上下盒子外边距最终取大的margin-top 或 margin-bottom
7.左右盒子外边距最终取和值margin-right 或 margin-left
8.margin:0 auto;上下是0 左右居中

边框属性
1.border-style: dotted;(点线) dashed;(虚线) solid(实线); double;(双线) groove;(槽线) ridge;(脊状) inset;(凹陷) outset;
2.border-width:; 边框宽度
3.border-color:#;
4.简写方法:border:width style color;
5.Border:1px solid red

CSS文字属性
1.color : #999999; /文字颜色/
2.text-decoration:underline; /加下划线/
3.text-align:center; /文字居中对齐/
4.vertical-align:top;
5.top 把元素的顶端与行中最高元素的顶端对齐
6.bottom 把元素的顶端与行中最低的元素的顶端对齐。
7.图像:list-style-image: url(xxx.gif/jpg/png);

CSS链接属性
1.a:link /超链接文字格式/
2.a:visited /浏览过的链接文字格式/
3.a:hover /鼠标转到链接/
4.a:active /按下链接的格式/

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


本文名称:真正零基础学习HTML(四)-创新互联
网站路径:http://pwwzsj.com/article/hdeej.html