新特性: 1.語義化更好的內容標籤(header,footer,nav,aside,section,article) 2.音頻、視頻API(audio,video) 3.本地離線存儲localStorage長期存儲數據,瀏覽器關閉後數據不丟失,sessionStorage的數據在瀏覽器關閉後自動刪除。 4.表單控件:datalist,date,month,week,range,time,email,url,search 5.畫布(Canvas):用於在網頁上繪製圖形,該元素標籤強大之處:能夠直接在HTML上進行圖形操做。 6.拖拽釋放(Drag and drop)API 7.地理(Geolocation)API 移除的元素: 純表現的元素:big,font,s,center; 支持h5新標籤:IE678支持經過document.createElement方法產生的標籤,能夠利用這一特性讓這些瀏覽器支持h5新標籤(最好方式直接使用成熟框架,如html5shim框架)
新特性:
1.border-radius(圓角),box-shadow(陰影),text-shadow(文字陰影),gradient(線性漸變),transform(旋轉)
2.增長了更多css選擇器 多背景rgba
3.僞元素是::selection
新增僞類: p:only-child 選擇屬於其父元素的惟一子元素的每一個<p>元素
p:nth-child(2) 選擇屬於其父元素的第二個子元素的每一個<p>元素
:enabled、:disabled 控制表單控件的禁用狀態
:checked 單選框或複選框被選中
4.媒體查詢,多欄佈局
5.border-image
6.box-sizing屬性
7.css3實現動畫
.qbh-title-sofa {
position: absolute;
bottom: 378px;
left: 50%;
transform: translate(-150%,0);
animation: move-sofa 1.5s infinite;
}css
@keyframes move-sofa {
0% {
bottom: 338px;
}
50% {
bottom: 378px;
}
100% {
bottom: 338px;
}
}
過渡: 給改變添加過程
transition:
過渡屬性 transition-property
過渡總時間 transition-duration
過渡速度 transition-timing-function
過渡延遲 transition-delay
動畫
animation:
動畫名稱animation-name
動畫總時間animation-duration
動畫的速度animation-timing-function
動畫的延遲animation-delay
動畫的次數 animation-iteration-count infinite(動畫不停的運動)
動畫的方向 animation-direction
動畫的結束時的狀態 animation-fill-mode
動畫的播放狀態 animation-play-state
轉換
位移轉換(用的多)
translateX
translateY
translateZ (這個轉換什麼狀況下才有效果) perspective transform-style: preserve-3d
translate();html
旋轉轉換
rotateX()
rotateY()
rotateZ()html5
縮放轉換
scaleX()
scaleY()css3