總結一下今天默寫的內(nèi)容
行內(nèi)元素
span
,strong
,b
,em
,i
,u
,ins
,img
,sub
,sup
,s
特點是不能設置寬高蹂安,寬隨內(nèi)容增多而增大
塊元素
div
,p
,hr
,dl
,dd
,dt
,ul
,ol
,li
,h1
,h2
,h3
,h4
,h5
,h6
特點是獨占一行
讓行內(nèi)轉換成行內(nèi)塊元素
display:inline-block;
單行文本省略號
overflow:hidden;
text-overflow:ellispis;
white-space:nowrap;
多行文本省略號
overflow:hidden;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
文本居中
text-align:center;
盒子居中
margin:0 auto;
解決高度塌陷問題
overflow:hidden;
padding-top:1px;
border:1px solid red;
清除浮動
clear:both;
a標簽的4個偽元素順序
link
,visited
,hover
,actice
去除a標簽下劃線
text-decoration:none;
字體大小,字體顏色怕膛,字體粗細
font-size
,color
,font-weight
去除字體傾斜
font-style:normal;
在li標簽后邊用偽元素設置一個圓
li::before{
display:inline-block;
content:"";
width:100px;
height:100px;
border-radius:50%;