關於css知識要點總結大全

一.span標籤:能讓某幾個文字或者某個詞語凸顯出來
<p>
今天是11月份的<span>第一天</span>,地鐵卡不打折了
</p>

二.字體風格

font-family:字體類型
font-size:字體大小
font-style:字體風格
font-weight:字體粗細
font: 風格 粗細 大小 類型;
三.文本樣式

color 設置文本顏色 rgb(0,0,255),rgba(0,0,255,0.5)
text-align 設置元素水平對齊方式
text-indent 設置首行文本的縮進
line-height 設置文本的行高
text-decoration 設置文本的裝飾
vertical-align 設置文本垂直方式
text-shadow 設置文字陰影 text-shadow: 顏色 x軸偏移位置 y軸偏移位置 模糊半徑
四.超鏈接僞類
單擊訪問前
.class01:link{
color: green;
text-decoration: none;
}
單擊訪問後
.class02:visited{
color: pink;
text-decoration: none;
}
鼠標懸浮
.class03:hover{
color: aqua;
text-decoration: none;
}
單擊未釋放
.class04:active{
color: red;
text-decoration: none;
}
五.列表樣式
list-style-type 列表項前圖標
list-style-image 列表項前圖片
list-style-image:url(../image/QQ圖片20181101095555.png);

六.背景樣式
background-color 設置背景顏色
background-image 設置背景圖像
background-repeat 設置圖像是否平鋪
background-position 設置背景圖像位置
background: 背景顏色 背景圖像 x軸偏移位置 y軸偏移位置 平鋪;
七.漸變
IE瀏覽器是Trident內核,加前綴:-ms-
Chrome瀏覽器是Webkit內核,加前綴:-webkit-
Safari瀏覽器是Webkit內核,加前綴:-webkit-
Opera瀏覽器是Blink內核,加前綴:-o-
Firefox瀏覽器是Mozilla內核,加前綴:-moz-

background: -webkit-gradient(linear,left bottom,right top,from(red),to(blue));
background: linear-gradient(to bottom left,red,black);


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章