CSS3常用屬性

2021-10-03 15:09:33 字數 1109 閱讀 9123

font-family:設定字型。比如 font-family:"microsoft yahei"。

font-weight:字型粗細,屬性值:normal、bold、bolder、lighter、100~900

line-height:行間距、

text-indent:首行縮排

letter-spacing:字間距

word-spacing:單詞間距

cursor滑鼠樣式

css引入格式:內邊距 padding 和外邊距 margin 邊框 border

content

background-sizi:

background-image 背景位址

background-repeat 是否平鋪

background-position

display: bolck、inline-block;

text-align: center; 文字水平居中

line-height: 文字垂直居中

text-decoration: none; 文字裝飾

list-style: none;取消ul ol 遠點

border-radius: 左上角 右上角 右下角 左下角

清楚浮動

clear:both;

overflow: hidden

after

position; relative 相對定位 absolute 絕對定位 fixed 固定定位

visibility 可見性,overflow 溢位

vertical-align 垂直對齊:baseline 、 top 、 middle 、bottom

過度:transition: 要過渡的屬性 花費時間 運動曲線 何時開始;

transition: all 0.6s; 後面倆個屬性可以省略

2d變形(css3) transform;rotatex() rotatey()rotatez()就是沿著 x 、y、z立體旋轉

動畫(css3) animation

@keyframes 動畫名稱 0%

to 100%

}

CSS3 常用屬性

border radius 圓角 乙個值 四個值 每個值拆分成兩個方向值 box shadow 盒子陰影 效能殺手 box shadow x y 模糊半徑 陰影拓展半徑 陰影顏色 投影方式 text shadow 文字陰影 效能殺手 text shadow x y 模糊半徑 陰影顏色 rgba r,...

常用css3屬性

1.設定文字的可選擇性 webkit user select none text 2.設定背景的繪製區域 background clip border box padding box content box 3.使元素看起來像標準的butt on 4.去掉type為number型別的小箭頭 inpu...

css3常用屬性

1.塊級元素水平居中 margin 0 auto 2.塊級元素上下居中 vertical align middle 3.text decoration none 沒有線 underline 下劃線 overline 上劃線 line through 刪除線 4.text indent 文字首行縮排 ...