学习Web前端的日子03,部分装载

来源:互联网 发布:杭州网络教育专升本 编辑:程序博客网 时间:2024/06/03 19:40

1月14号

今天的天气挺冷的

而今天的学习的内容就是css里面的各种选择器

              <style>
h3{ color: blue;}/*标签选择器*/
.one{color: #000000!important;}/*类选择器*/
#two{color: aqua;}/*ID选择器*/
</style>

<h3  class="one" id="two" style="color: #FF0000;">土豆</h3><!--行内样式,优先级大于标签,在开始标签里面写-->

<style >

.box{ width: 300px; height: 300px; color: red;} 类选择器

#ra{ width: 300px; height: 300px; color:  blue;}/*id选择器优先级高于类选择器、后代选择器*/

div p{width: 300px; height: 300px; color:  black;} 后代选择器

div.box{width: 300px; height: 300px; color: #C3C9D2;}/*交集选择器*/

div#ra{ width: 300px; height: 300px; color:  aquamarine;}/*交集选择器*/

.box,.aox{ color: brown ;}/*并集选择器,以英文逗号隔开、、作用域小则优先级较高*/

p,div{color: #7FFFD4 ;}/*后代的并集选择器优先级小于上面的并集选择器*/

</style>

<style >
*{ list-style: none;font-size: 12px; text-decoration: line-through}/**:万能通配符—————— 优先级小*/
div.class{ width: 200px; height: 200px; background: cornflowerblue;}/*交集选择器*/
.one{list-style: none;}
.active{font-size:50px;}
</style>

今天的内容有好好听的话还是可以理解的,相比于前两天的都是较好的,得意有认真的去做笔记 
0 0