前端开发-CSS

三种CSS写法

1.在标签内书写 style=“xxx”

2.在head中书写 

3.在外部文件书写

 

各种选择器

常用:类选择器,标签选择器,后代选择器

少用:ID选择器,属性选择器

 

 

 

 多个样式覆盖问题:

1.样式不同时一起作用

2.样式相同时,取style中排序后面的

3.若要强制使用,则添加important,如 color:red !important;

 

posted @ 2023-04-05 18:23  SiNanhong  阅读(18)  评论(0编辑  收藏  举报