有一个不显示,为什么呢?
来源:2-17 编程练习
weixin_慕田峪7033080
2020-06-30 15:44:10
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>动态伪类</title>
<style type="text/css">
/*此处写代码*/
input:hover{border-color: #f00;}
input[type="text"]:focus{background: orange;}
input[type="password"]:focus{background: #ff0;}
</style>
</head>
<body>
<!-- 此处写代码 -->
<form>
用户名:<input type="text" name="text>
密码: <input type="password" name="password">
</form>
</body>
</html>
1回答
同学你好,由于第一个input框的name属性值,缺少闭合的引号,导致第二个input结构没有显示,可做如下修改:
优化建议:
input的默认边框,不太好看,如下:
建议给input设置个默认边框,如下:
如果我的回答帮到了你,欢迎采纳,祝学习愉快!
相似问题