遮罩层。总是大出那么一些。。这是为啥
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | <!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 > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | *{ 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积分~
来为老师/同学的回答评分吧