如果文档宽度小于 300 像素则修改背景颜色(background-color):
@media screen and (max-width: 300px) {
body {
background-color:lightblue;
}
}
css中cursor属性cursor:pointer:鼠标显示小手字样。
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box; 设置宽或者高是百分比时,包含padding和margin。
box-sizing:border-box;
-moz-box-sizing:border-box; /* Firefox */
-webkit-box-sizing:border-box; /* Safari */,规定两个并排的带边框的框
css中:after或者:before设置在之前或者之后设置内容。
h1 {text-decoration:overline
} h2 {text-decoration:line-through
} h3 {text-decoration:underline
} h4 {text-decoration:blink
}文本修饰下划线的样式
:last-of-type设置最后元素的属性。
[class*= col-] 代表包含 col- 的类名 ,比如说 col-md-4 ,demo-col-2(这个是虚构的)等都可以匹配到。
[class^=col-] 代表 以 col- 开头的类名,比如说 col-md-4
[class$=col-] 代表以 col- 结尾的类名
2、文本对齐:text-align: justify; text-align-last: right;