我使用此代码
<asp:TextBox ID="txtsearch" runat="server" Style="margin-top:21px; margin-right: 14px; margin-bottom: 0px;
width: 120px; height: 13px; font-size: 11px" BorderStyle="None"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TBWE2" runat="server"
TargetControlID="TextBox1"
WatermarkText="Type First Name Here"
WatermarkCssClass="watermarked" />
风格是
.unwatermarked
{
height: 18px;
width: 148px;
}
.watermarked
{
height: 20px;
width: 150px;
padding: 2px 0 0 2px;
border: 1px solid #BEBEBE;
background-color: #F0F8FF;
color: gray;
}
它是显示水印,但它是闪烁的文字!