李祖海-20201028
(1)在字体修饰时:
color: green;/*修饰字体颜色*/
font-size: 30px;/*修饰字体大小*/
font-family: "宋体";/*字体类型*/
font-style: italic;/*字体样式*/
font-weight: bold;/*字体加粗*/
letter-spacing: 5px;/*字体间距*/
(2)在修饰文本时
text-align: center;/*对齐方式*/
line-height: 300px;/*行高*/
text-decoration: overline ;/*文本划线*/
text-shadow: 2px 2px 3px green;/*字体阴影*/
text-indent: 2em;/*首行缩进*/
(3)在修饰背景图时
background-color: green;/*背景颜色*/
background-image: url(../img/lxh.jpg);/*背景图片*/
/*background-position: -100px;背景图片平移*/
background-size: cover;/*图片大小cover图片等比例放大*/
/*background-size: 300px 300px;/*背景图片样式*/*/
/*background-repeat:repeat-x;背景图片平铺*/
background-attachment: fixed;/*背景图片固定*/
opacity: 0.5;/*透明度*/
(4)常用选择器:优先级【类选择器 > 标签选择器 】 【id选择器> 类选择器】
子选择器 群组选择器 后代选择器 伪类选择器 类选择器
标签选择器 id选择器 类选择器
(5)在插入后面用来修饰的CSS 程序是<link rel="stylesheet" href="css/style.css"/>
心得:今天老师讲的都可以跟的上,但是那些修饰背景图、字体、文本的程序容易搞混。其余的都还好吧
近期评论