html代码:
功能:点击输入的文本字体颜色的设置,并且输入内容时,文本框里的默认字消失。
<input type="text" placeholder="手机号、邮件地址" class="zh_number" style="onClick="this.style.color='black';this.value='';" onBlur="this.style.color=''"/>
css代码:
功能:文本框边框消失。
.zh_number{
border: 0;
width: 330px;
height: 20px;
font-size: 14px;
font-family: simsun;
position: absolute;
top: 35px;
left: 20px;
/*去掉文本框点击之后的边框*/
outline: none;
}
功能:文本框默认字体颜色的设置
::-webkit-input-placeholder {
color: #CCCCCC;
}