2018-12-20 兄弟元素选择器,选择器优先级,文本标签

餐厅小游戏
10:*
11:plate *
12:plate +apple
13:bento~pikcle
14:plate > apple
15:orange:first-child
16::only-child
17:.small:last-child
18:plate:nth-child(3)
19::nth-last-child(4)
20:apple:first-of-type
21:plate:nth-of-type(even)
22:plate:nth-of-type(2n+3)
23:apple:only-of-type
24:.small:nth-child(even)
25:bento:empty
26:apple:not(.small)

兄弟元素选择器
语法:
查找后边一个兄弟元素
兄弟元素 + 兄弟元素{}
查找后边所有兄弟元素
兄弟元素 ~ 兄弟元素{}
否定伪类
语法:
not(选择器){}
例如:p:not(.hello)表示选择所有p元素但class为hello的除外。

权重(依次排列,优先级从高到低)
!important
内联(1000)
id(100)
类,伪类(10)
元素p(1)
通配(0)
继承样式无优先级
优先级一样用后面的

em标签表示一段内容中的着重点
strong标签表示一个内容的重要性
em显示斜体,strong显示粗体。
会使文本变成斜体
会使文本变成粗体
会显示一个比父元素小的字号
指明对某内容的引用或参考


《水浒》是本书



blockquote用于长引用
q用于短引用

sup 定义上标
sub 定义下标

你可能感兴趣的:(2018-12-20 兄弟元素选择器,选择器优先级,文本标签)