background-size: 100% 100%; 背景經過拉伸實現填充 自適應css
overflow: hidden; 清除浮動html
box-sizing: border-box; 爲元素指定的任何內邊距和邊框都將在已設定的寬度和高度內進行繪製gulp
border-radius:3px; 邊框圓角指針
vertical-align: middle; 實現多個內聯塊垂直中部對齊orm
cursor:pointer; 鼠標指針樣式 htm
:nth-child(nn) 僞類選擇器能夠給指定行(n)設置樣式odd表示奇數行,even表示偶數行ip
box-shadow:0px 3px 6px rgba(0,0,0,0.5) 陰影rem
border: none; outline:none; 取消input框默認邊框和選中後的邊框input
使用絕對定位來居中:
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%); (未設置寬度)
position: absolute;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto; (設置寬度 只能設置左右居中不能設置上下居中)
gulp中使用rem:
<script src="dist/js/lib/viewport/viewport.js"></script>
設置縮放標準
docEl.style.fontSize = 40 * (clientWidth / 1440) + 'px';