css--2.常见属性

来源:互联网 发布:俄罗斯民族性格 知乎 编辑:程序博客网 时间:2024/05/16 06:34

1      常用属性

1.1  字体属性

              font-family:"微软雅黑";/*字体样式*/

               font-size:50px;/*字体大小*/

              font-weight:900;/*字体加粗*/

              font-style:italic;/*斜体*/

              color: red;/*颜色*/

 

1.2  文本属性

text-decoration:line-through;

    /*删除线none取消underline下划线overline上划线blink文本闪烁*/

 

text-transform:uppercase;

    /*大写小写lowercase none capitalize首字母大写*/

 

word-spacing:200px;/*字间隔*/

letter-spacing:5px;/*字母间隔*/

 

line-height:200px;/*行间距*/

text-align:center;/*对其方式*/

 

 

word-break:/*自动换行*/;

word-wrap:break-word;/*长单词和URL地址换行*/

 

text-shadow:

         Color:指定颜色。

         Length:可为负值。指定阴影的水平延伸距离。

         Lengt:可为负值。指定阴影的垂直延伸距离。

         Opacity不可为负值。指定模糊效果的作用距离。

                   如果仅仅需要模糊效果,将前两个length全部设定为0 。

 

 

1.3  边距

border-style:inset;/*边框样式P141*/

              border-color: blue;/*边框颜色*/

              border-width:10px;/*边框宽度*

 

              /*局部边框样式*/

              border-top-color: red;

              border-bottom-style:dotted;

 

1.4  背景

background-color: #000;/*背景色*/

background-image:url(img/2.jpg);/*背景图*/

background-repeat:no-repeat;  /*重复方式 */

background-position:200px ,300px;/*背景定位*/

 

              background-attachment: fixed;/*固定背景图*/

                            background-size:cover;/*调整背景大小*/

             

              cursor: url(img/12.jpg),default;

              cursor: url(img/2.jpg);

 

综合属性:background

 

1.5  列表样式

li {

         list-style:none;/*去除样式*/

}

 

1.6  尺寸相关属性

 宽度:width,max-width,min-width

高度:height,max-height,min-height

1.7  表格相关属性

边框线显示方式:border-collapse:separate(边框分开,双线)| collapse

 

单元格边框间距:前提border-collapse:separate

         border-spacing

表格标题位于表格什么位置

         caption-side:top   left   bottom right

表格布局方式:

         Table-layout:

 

 只是常用,具体还是看w3c

0 0
原创粉丝点击