目的:清除浮層,包括內容和佔位。
clearfix 是應用於內容有浮動的情況,這是一種標準且通用的寫法.
實現:在公用css或者base.styl裏面寫入
.clearfix
display: inline-block
&:after
display: block
content: "."
height: 0
line-height: 0
clear: both
visibility: hidden
目的:清除浮層,包括內容和佔位。
clearfix 是應用於內容有浮動的情況,這是一種標準且通用的寫法.
實現:在公用css或者base.styl裏面寫入
.clearfix
display: inline-block
&:after
display: block
content: "."
height: 0
line-height: 0
clear: both
visibility: hidden
<style type=text/css>td { font-size: 12px; color: #000000; line-heig
絕對定位 + margin,讓明確寬高的盒子水平垂直居中於窗口 <!DOCTYPE> <html> <head> <meta charset="UTF-8"> <meta name="vie
二級導航實例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <ti
3d盒子反戰 效果如圖如下: HTML重要的代碼如下: <ul> <li> <div class="box"> <div class="front">目錄