单行缩略号
.overhid{
overflow: hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
css圆角兼容
.setradius{
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
}
元素阴影
.boxShadow{
-moz-box-shadow: 5px,5px,1px,#000;
-webkit-box-shadow:5px,5px,1px,#000;
box-shadow: 5px,5px,1px,#000;
}
border取消宽度影响
.noborder{/*border 0width*/
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
css3的背景渐变
.background{
background:-webkit-linear-gradient(top,#FFF,#cb1919);
background:-o-linear-gradient(top,#FFF,#cb1919);
background:-ms-linear-gradient(top,#FFF,#cb1919);
background:-moz-linear-gradient(top,#FFF,#cb1919);
background:linear-gradient(top,#FFF,#cb1919);
}
css的透明
.transparent{
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity: 0.5;
opacity: 0.5;
}
取消div选中蓝色背景
.nousel{
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none; /* Firefox all */
-ms-user-select: none; /* IE 10+ */
-o-user-select: none;
user-select: none;
}
css3设置字体
@font-face{
font-family: myFirstFont;
src: url('Sansation_Light.ttf'), url('Sansation_Light.eot'); /* IE9+ */
}
div{
font-family:myFirstFont;
}
取消移动端元素被点击高亮显示
.nohighlight{
-webkit-tap-highlight-color: transparent;
}
取消移动端表单元素的默认风格
input,textarea{
-webkit-appearance: none;
}
取消表单元素的轮廓样式
input{
outline:none;
}
textarea去掉右侧滚动条,去掉右下角拖拽
textarea{
overflow:hidden;
resize:none;
}