關於html5 css3常用屬性的介紹

2022-01-23 13:27:02 字數 1194 閱讀 5058

srcposter 載入等待的畫面

input表單元素

其他表單元素

placeholder

autofocus

autocomplete

multiple 可以多選檔案提交。

結構偽類選擇器

第0個元素或是超出元素的範圍會被省略

e:first-of-type 指定型別e的第乙個

e:last-of-type 指定型別e的最後乙個

e:nth-of-type(n) 指定型別e的第n個

偽元素選擇器

三類選擇器的權重與類選擇器一樣

2d轉換 transform

rotate

scale

結合transition一起使用,transform表示移動的方式,transition表示整個移動的過程

2d轉換綜合寫法

animation 動畫

常見屬性:

animation-delay 規定動畫何時開始,預設是0

animation-play-state 規定動畫是否正在執行或暫停。預設是"running",還有"pause"

animation-fill-mode 規定動畫結束後狀態,保持forwards回到起始backwards

動畫簡寫屬性

animation: myfirst 5s linear 2s infinite alternate;

簡寫屬性裡面不包含animation-play-state

暫停動畫:animation-play-state: puased;經常和滑鼠經過等其他配合使用

想要動畫走回來,而不是直接跳回來:animation-direction : alternate

盒子動畫結束後,停在結束位置: animation-fill-mode : forwards

多個動畫使用「,」分隔

3d轉換

透視perspective

rotate3d 3d旋轉

3d呈現 transform-style

瀏覽器字首

提倡寫法

-moz-border-radius: 10px;

-moz-border-radius: 10px;

-webkit-border-radius: 10px;

border-radius: 10px;

關於html5 css3常用屬性的介紹

src poster 載入等待的畫面 input表單元素 其他表單元素 placeholder autofocus autocomplete multiple 可以多選檔案提交。結構偽類選擇器 第0個元素或是超出元素的範圍會被省略 e first of type 指定型別e的第乙個 e last o...

HTML5 CSS3樣式 屬性

href 路徑 src 路徑 標籤的屬性 border 邊框 cellspacing 外邊距 cellpadding 內邊距 align 位置 bgcolor 背景色 background 背景 bordercolor 邊框顏色 table中 colspan 跨2列 rowspan 跨 行 type...

初學HTML5 CSS3動畫

乙個完整的css animations由兩部分構成 在css3中使用 keyframes規則來建立動畫,keyframes可以設定多個關鍵幀,每個關鍵幀表示動畫過程中的乙個狀態,多個關鍵幀就可以使動畫十分絢麗。keyframes animationname animation屬性用於描述動畫的css...