1.文字内容一行展示不下,展示…
overflow:hidden:
white-space:nowrap:
text-overflow:ellipsis:
2.给Input标签的placehoder属性设置样式(需兼容各浏览器)
html代码
<div id="container">
<input id="J_myInput" type="text" placeholder="修改placeholder样式" />
</div>
css代码
#J_myInput{
color: #ccc;
font-size: 14px;
width: 180px;
height: 36px;
line-height: 36px;
}
#J_myInput::-webkit-input-placeholder{
/*webkit,blink,edge*/
color: #ccc;
}
#J_myInput:-moz-placeholder{
/*firefox 4-18*/
color: #ccc;
}
#J_myInput::-moz-placeholder{
/*firefox 19+*/
color: #ccc;
}
#iJ_myInput:-ms-input-placeholder{
/*ie 10-11*/
color: #ccc;
}