请问我的输入框(input)为什么没法输入字符
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>homework1</title> <link rel="stylesheet" href="homework1.css"> </head> <body> <div class="container"> <!-- 顶部 --> <div class="header"> <div class="logo"> <img src="images2/logo.png" alt="logo.png"> </div> <div class="nav"> <ul> <li>HOME</li> <li>ABOUT</li> <li>GALLERY</li> <li>FACULTY</li> <li>EVENTS</li> <li>CONTACT</li> </ul> </div> </div> <div class="banner"> <div class="bgp"> <img src="images2/banner3.jpg" alt="banner3.jpg"> </div> <!-- 遮罩层 --> <div class="cover"></div> <!-- 用户信息输入区 --> <div class="over_cover"> <form > <div> <input type="text" placeholder="Your Name" class="inf"> <div> <input type="text" placeholder="Your Phone" class="inf"> </div> <div> <input type="Email" placeholder="Your Email" class="inf"> </div> <div> <textarea placeholder="With Your Comment Here" class="comment" ></textarea> </div> </form> </div> </div> <div class="about"></div> <div class="gallery"></div> <div class="footer"></div> </div> </body> </html>
css:
*{ margin: 0px; padding: 0px; } .container{ width: 1920px; height: 3260px; background-color: lightblue; } .clear{ clear: both; } .container .header{ width: 100%; height: 80px; background-color: #07cbc9; position: fixed; top:0px; z-index: 5; } .container .header .logo{ float:left; } .container .header .logo img{ line-height: 80px; padding-top:17px; padding-left: 100px; } .container .header .nav ul{ float:right; margin: 0px; margin-right: 100px; } .container .header .nav ul li{ float:left; list-style: none; width: 80px; height: 80px; line-height: 80px; text-align: center; padding:0 20px; color:#ffffff; font-size: 20px; font-weight: bolder; font-family: " Microsoft YaHei UI" } .container .banner{ margin-top: 80px; z-index: 0; } .container .banner .bgp{ width:1920px; height: 1200px; } .container .banner .bgp img{ width:100%; height: 1200px; } .container .banner .cover{ width:100%; height: 1200px; position: absolute; top:80px; left:0; background-color: #000000; z-index: 1; opacity: 0.5; } .container .banner .over_cover{ height:320px; width: 520px; position: absolute; top:300px; margin-left: 50%; left: -250px; } .container .banner .over_cover .inf{ background:none; width: 500px; height: 48px; margin-bottom: 20px; padding:10px 20px; border:2px solid #dce4e6; } .container .banner .over_cover .comment{ background:none; width: 500px; height: 144px; padding:10px 20px; margin-bottom: 20px; border:2px solid #dce4e6; }
3
收起
正在回答
4回答
你好,解决遮罩成问题建议修改以下css样式
.container .banner .cover{ /*width:100%;*/ /*height: 1200px;*/ /*position: absolute;*/ /*top:80px;*/ /*left:0;*/ /*background-color: #000000;*/ /*z-index: 1;*/ /*opacity: 0.5;*/ }
改为:
.container .banner .cover{ background-color: #000; opacity: 0.4; z-index: 1; position: absolute; top: 80px; width: 100%; height: 600px; }
.container .banner .over_cover{ /*height:320px;*/ /*width: 520px;*/ /*position: absolute;*/ /*top:300px;*/ /*margin-left: 50%;*/ /*left: -250px;*/ }
改为:
.container .banner .over_cover{ z-index: 2; width: 500px; position: absolute; top: 350px; margin-top:-150px; right: 50%; margin-right: -250px; text-align: center; }
如果解决您的问题请采纳,祝学习愉快!
PHP小白零基础入门
- 参与学习 人
- 提交作业 626 份
- 解答问题 4930 个
想要学好Web后端开发的中流砥柱语言,本阶段为你轻松铺就扎实的基础,从前端网页布局的搭建到后台PHP开发,助你从零基础到掌握主流开发语言。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星