CSS+div做文本域点击变色的效果怎么实现
就是这种了不点进去的时候文本域和下面再次输入密码一样点击了以后变色还有就是点击了以后旁边出现的这个提示对话框 怎样用CSS+DIV实现效果?满意追加悬赏...
就是这种了不点进去的时候 文本域和下面再次输入密码一样点击了以后 变色还有就是点击了以后 旁边出现的这个提示对话框 怎样用CSS+DIV实现效果?满意追加悬赏
展开
2个回答
展开全部
这个要用JS配合才行!
试试这个。。原创!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
* {
margin:0;
padding:0;
}
body {
font-family:Arial, Helvetica, sans-serif,"微软雅黑";
font-size:13px;
line-height:30px;
}
.input1 {
border:#999999 1px solid;
height:24px;
line-height:24px;
}
.input2 {
border:#CCCCCC 1px solid;
background-color:#efefef;
height:24px;
line-height:24px;
color:#333333;
}
</style>
</head>
<body>
<div style="margin:0 auto; width:400px; padding-top:100px;">
<form id="form1" name="form1" method="post" action="">
用户名:<input name="UserName" type="text" class="input1" onfocus="this.className='input2'" onblur="this.className='input1'" />
<br />
<br />
密 码:<input name="PassWord" type="text" class="input1" onfocus="this.className='input2'" onblur="this.className='input1'" />
<br />
<br />
验证码:<input name="test" type="text" class="input1" onfocus="this.className='input2'" onblur="this.className='input1'" />
<br />
<br />
<input type="submit" name="Submit" value="提交" />
</form>
</div>
</body>
</html>
试试这个。。原创!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
* {
margin:0;
padding:0;
}
body {
font-family:Arial, Helvetica, sans-serif,"微软雅黑";
font-size:13px;
line-height:30px;
}
.input1 {
border:#999999 1px solid;
height:24px;
line-height:24px;
}
.input2 {
border:#CCCCCC 1px solid;
background-color:#efefef;
height:24px;
line-height:24px;
color:#333333;
}
</style>
</head>
<body>
<div style="margin:0 auto; width:400px; padding-top:100px;">
<form id="form1" name="form1" method="post" action="">
用户名:<input name="UserName" type="text" class="input1" onfocus="this.className='input2'" onblur="this.className='input1'" />
<br />
<br />
密 码:<input name="PassWord" type="text" class="input1" onfocus="this.className='input2'" onblur="this.className='input1'" />
<br />
<br />
验证码:<input name="test" type="text" class="input1" onfocus="this.className='input2'" onblur="this.className='input1'" />
<br />
<br />
<input type="submit" name="Submit" value="提交" />
</form>
</div>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询