css实用属性

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

linear-gradient(direction, color-stop1...)      线性渐变 direction指定渐变方向或角度it

 

 使用绝对定位来居中:

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';

相关文章
相关标签/搜索