正在回答 回答被采纳积分+1
HTML部分:
<main>
<!-- banner -->
<section class="banner">
<img src="images/banner3.jpg" alt="">
<div class="mask">
<ul>
<li><input type="text" placeholder="your Name"></li>
<li><input type="text" placeholder="your Phone"></li>
<li><input type="email" placeholder="your Email"></li>
<li><textarea placeholder="Write Your Commernt Here"></textarea></li>
<li><input type="submit" value="SEND MASSAGE" ></li>
</ul>
</div>
</section>
</main>
CSS部分:
/* 主体遮罩层样式 */
main .banner {
width: 100%;
height: 600px;
position: relative;
}
/* 图片 */
main .banner img{
width: 100%;
}
/* 遮罩层 */
main .banner .mask{
width: 100%;
height: 713px;
background-color: rgba(0,0,0,.7);
position: absolute;
top: 0;
}
/* 遮罩层内的文本框 */
main .banner .mask ul{
width: 504px;
height: 360px;
position: absolute;
top:50%;
left: 50%;
margin-top: -180px;
margin-left: -252px;
color: #808080;;
}
/* 设置表单宽度和透明 */
main .banner .mask ul li textarea,main .banner .mask ul li input{
background-color:transparent ;
width: 502px;
}
/* 设置文本框的高度、间隙、边框 */
main .banner .mask ul li input{
height: 40px;
margin-bottom: 20px;
border:1px solid #808080;
}
main .banner .mask ul li textarea{
height: 110px;
margin-bottom: 20px;
border:1px solid #808080;
}
/* 提交按钮上的字的颜色、外边距、边框 */
main .banner .mask ul li input[type="submit"]{
margin: 0;
width: 200px;
border:1px solid #808080;
color: #808080;
}
/* 提交按钮所在的li相对于ul水平居中 */
main .banner .mask ul li:last-child{
text-align: center;
}



恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星