怎么让banner部分字体颜色和边框颜色同时是半透明色
<!DOCTYPE html>
<html>
<head>
<title>作业</title>
<style type="text/css">
*{padding: 0;margin: 0;font-family:'Microsoft YaHei UI' }
.top{width: 100%;height: 80px;background-color:#07cbc9 }
.top .logo{height: 60px;padding-top: 10px;float: left; margin-left: 100px;}
.top .nav .list{float: right; margin-right: 40px;text-align: center;}
.top .nav .list li{float: left;line-height: 80px;width: 80px;color: #fff;}
ul{list-style: none;}
.top .nav .list li:hover{background: #000;}
.banner{width: 100%;height: 500px; }
.banner img{width: 100%;height: 500px; }
.bannerlayer {position: absolute;top: 80px;left: 0;background: #000;width: 100%;height: 500px;opacity: 0.5;}
.bannerlayer-top{width: 500px;height: 300px;z-index: 2; position: absolute;top:330px;margin-top:-150px;left:50%;margin-left: -250px; }
.bannerlayer-top .form{width:500px;height: 300px;position: absolute;top:0;left:0; }
.bannerlayer-top .form .input{width: 450px;height: 30px;border: 1px solid #fff;margin: 5px 24px; background-color: transparent;}
.bannerlayer-top .form .textarea{width: 450px;border: 1px solid #fff;margin: 5px 24px;padding-top: 5px; background-color: transparent;}
.bannerlayer-top .form .button{width:120px;height: 30px;border: 1px solid #fff;color:#fff;margin: 5px 189px; background-color: transparent;}
</style>
</head>
<body>
<div class="top">
<div class="logo">
<img src="logo.png" >
</div>
<div class="nav">
<ul class="list">
<li>HOME</li>
<li>ABOUT</li>
<li>GALLERY</li>
<li>FACULTY</li>
<li>EVENTS</li>
<li>CONTACT</li>
</ul>
</div>
</div>
<div class="banner">
<img src="banner3.jpg" >
</div>
<div class="bannerlayer"></div>
<div class="bannerlayer-top">
<form class="form">
<input type="text" name="" placeholder=" your Name" class="input">
<input type="text" name="" placeholder=" your Phone" class="input">
<input type="text" name="" placeholder=" your Email" class="input">
<textarea placeholder=" Write Your Comment Here"rows="6" cols="30" class="textarea"></textarea>
<button class="button">SEND MESSAGE</button>
</form>
</div>
<div></div>
<div></div>
</body>
</html>
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 11218 份
- 解答问题 36713 个
从一个不会编程的小白到一个老司机是需要过程的,首先得入门,学习基础知识,然后才能进阶,最后再到精通,本专题是你走进前端世界的不二选择!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星