CSS——常用易忘样式

更改 chrome下,最小字体12

.el{
-webkit-text-size-adjust: none;
font-size: 10px;
}

或:

.el{
-webkit-transform: scale( 0.8);
}


设置placeholder样式

::-webkit-input-placeholder{
font-size: 14px;
color:grey;
}
/* mozilla firefox 19+ */
::-moz-placeholder{
font-size: 14px;
color:grey;
}
/* mozilla firefox 4 to 18 */
:-moz-placeholder{
font-size: 14px;
color:grey;
}
/* IE 10+ */
:-ms-input-placeholder{
font-size: 14px;
color:grey;
}


单行文本以省略号形式显示

.el{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}


禁用某个元素的点击事件

.el{
pointer-events: none;
}

猜你喜欢

转载自blog.csdn.net/qq_36111804/article/details/80803864