全兼容透明:
.transparent_class {
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
背景透明度(iOS必须使用rgba函数,rgb函数会导致透明度不生效)
rgba(0,0,0,0);
元素穿透 (即元素遮罩层不遮挡下方元素的代码)
.dome{
-webkit-pointer-events: none;
-moz-pointer-events: none;
-ms-pointer-events: none;
-o-pointer-events: none;
pointer-events: none;
}
动态计算元素宽高 (通过css里面的calc属性函数实现)
height: calc(100vh - 60px);
单行文本溢出自动省略
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
多行文本溢出自动省略
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
100%高度并兼容IOS
overflow: auto;
-webkit-overflow-scrolling: touch;
height: 100vh;