我有一些代码,我使用,使我的投入有一个漂亮的背景颜色,当你把鼠标放在他们:CSS焦点代码不起作用5
<!DOCTYPE html>
<html lang="en-us" dir="ltr">
<head>
<style type="text/css">
input[type="text"]:focus
{
background-color: #bfd0eb;
}
</style>
</head>
<body>
<form method="post">
<input type="text" name="input1" id="input1" value="" />
<input type="text" name="input2" id="input2" value="" />
</form>
</body>
</html>
这与XHTML的伟大工程1.0 Transitional,但是当我切换到HTML 5时,如果我点击“input2”,它将焦点从“input2”点击出来,并且始终关注“input1”。我究竟做错了什么?谢谢!
both are type =“text”where password input ??? – SVS 2012-07-27 14:49:42
需要查看更多HTML。 – BoltClock 2012-07-27 14:50:55
这就是代码...没有密码输入,我删除它。 – PolishHurricane 2012-07-27 14:53:29