网页代码:
<asp:Label ID="Label1" runat="server" Text="用户名:"></asp:Label>
<asp:TextBox ID="userName" runat="server" CssClass="underLineTextBox"></asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="密码:"></asp:Label>
<asp:TextBox ID="passWord" runat="server" TextMode="Password"></asp:TextBox>
<br />
<asp:ImageButton ID="loginButton" runat="server" ImageUrl="~/image/chakan.png" OnClick="loginButton_Click" />
<asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/image/tijiao.png" OnClick="ImageButton2_Click" />
</div>
</form>
CSS文件代码:
body {
font-size:30px;
line-height:140%;
text-decoration:none;
font-family:Verdana,Arial,helvetica,sans-serif,宋体;
}
.underLineTextBox
{
BORDER-BOTTOM-COLOR: yellow;
BORDER-BOTTOM-WIDTH: 1px;
BORDER-LEFT-COLOR:red;
BORDER-LEFT-WIDTH: 0px;
BORDER-RIGHT-COLOR: black;
BORDER-RIGHT-WIDTH: 0px;
BORDER-TOP-COLOR: black;
BORDER-TOP-WIDTH: 0px;
COLOR: black;
FONT-SIZE: 10pt;
HEIGHT: 20px;
}
养成前端调试习惯,而不是猜。 chrome,firefox都有良好的相关工具。 F12神键大法,连IE都支持了。