遮罩层。总是大出那么一些。。这是为啥
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" href="css/demo.css"> </head> <body> <div class="top"> <img src="images/logo.png" alt=""> <ul> <li><a href="#">HOME</a></li> <li><a href="#">ABOUT</a></li> <li><a href="#">GALLERY</a></li> <li><a href="#">FACULTY</a></li> <li><a href="#">EVENTS</a></li> <li><a href="#">CONTACT</a></li> </ul> </div> <div class="banner"> <div class="shade"></div> <img src="images/banner3.jpg" alt=""> <div class="form_data"> <input type="text" placeholder="Your Name" class="input_info"> <input type="text" placeholder="Your Phone" class="input_info"> <input type="text" placeholder="Your Email" class="input_info"> <textarea name="" id="" cols="30" rows="10" placeholder="Your Content"></textarea> <input type="button" name="" id="" value="SEND MESSAGE"> </div> </div> <div class="about"></div> <div class="gallery"></div> <div class="footer"></div> </body> </html>
*{ margin:0; padding: 0; } .top{ background-color:#07cbc9; height: 60px; width: 100%; } .top img{ margin-left:60px; margin-top:5px; } .top ul{ float: right; list-style: none; margin-right: 60px; margin-top:20px; } .top ul li{ float: left; margin-right: 20px; } .top ul li a{ font-family:"Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif; font-size:13px; font-weight: bold; color:white; text-decoration: none; } .banner{ position:relative; width: 100%; height:100%; } .banner img{ width:100%; } .banner .shade{ background-color: rgba(0,0,0,0.4); position:absolute; float:left; width:100%; height:100%; } .banner .form_data{ position:absolute; top:25%; left:30%; text-align: center; height: 700px; width: 40%; } .banner .form_data input[type="text"]{ float:left; width:100%; background-color: transparent; border: 1px solid white; padding-left:10px; height: 40px; margin-bottom: 20px; color:white; box-sizing:border-box; font-size: 18px; } .banner .form_data input[type="text"]:hover{ border: 1px solid #07cbc9; } input::-webkit-input-placeholder { color:white; } input::-moz-placeholder { /* Mozilla Firefox 19+ */ color: white; } input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color: white; } input:-ms-input-placeholder { /* Internet Explorer 10-11 */ color: white; } textarea::-webkit-input-placeholder { /* WebKit browsers */ color:white; } textarea:-moz-placeholder { /* Mozilla Firefox 4 to 18 */ color:white } textarea::-moz-placeholder { /* Mozilla Firefox 19+ */ color:white } textarea::-ms-input-placeholder { /* Internet Explorer 10+ */ color:white; } .banner .form_data textarea{ border: 1px solid white; resize: none; display: block; background-color:transparent; width: 100%; padding-left:10px; padding-top:5px; box-sizing:border-box; color:White; font-size: 18px; font-family:"Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif; } .banner .form_data textarea:hover{ border: 1px solid #07cbc9; }
遮罩层总是大出图片一些,我没搞懂为啥
5
收起
正在回答 回答被采纳积分+1
2回答
相似问题
登录后可查看更多问答,登录/注册
2. 从网页搭建入门JavaWeb
- 参与学习 人
- 提交作业 676 份
- 解答问题 9666 个
本阶段将从前端网页搭建入手,到Java Web基础,前后端结合助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星