请问表单如何镂空?字体调成白色为什么不显示了?write your comment该如何置顶?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>2-9作业</title> <link rel="stylesheet" href="2-9作业.css"> </head> <body> <!--header--> <div class="header"> <div class="logo"> <img src="../images/logo.png"> </div> <div class="daohang"> <ul> <li>HOME</li> <li>ABOUT</li> <li>GALLERY</li> <li>FACULTY</li> <li>EVENTS</li> <li>CONTACT</li> </ul> </div> </div> <!--banner--> <div class="banner"> <div class="background"> <img src="../images/banner3.jpg"> <div class="cover"></div> </div> <div class="form"> <form> <input class="input" type="text" name="your Name" value="your Name"> <br> <input class="input" type="text" name="your Phone" value="your Phone"> <br> <input class="input" type="text" name="your Email" value="your Email"> <br> <input id="comment" class="input" type="text" name="comment" value="Write Your Comment Here"> <br> <br> <input type="submit" class="submit" value="SEND MESSAGE"> </form> </div> </div> <!--about--> <!--gallery--> <!--footer--> </body> </html>
*{
margin: 0;
padding: 0;
}
.header{
width: 1700px;
height: 100px;
background-color: #07cbc9;
font-family: "Microsoft YaHei UI";
overflow: hidden;
position: sticky;
top: 0px;
z-index: 2;
}
.logo{
height: 100px;
width: 260px;
color: #ffffff;
float: left;
line-height: 100px;
position: absolute;
left: 10%;
top: 20px;
}
.daohang{
float: right;
height: 100px;
width: auto;
position: absolute;
right: 150px;
line-height: 100px;
top: -10px;
color: #ffffff;
}
.daohang ul li{
font-size: 10px;
text-align: center;
list-style: none;
height: 100px;
width: 60px;
float: left;
line-height: 100px;
margin-right: 20px;
}
.daohang ul li:hover{
background-color:#000000 ;
}
.banner{
width: 100%;
height: 800px;
position: relative;
}
.banner .cover{
width: 1700px;
height: 800px;
background: #555555;
position: absolute;
top: 0;
opacity: 0.5;
}
.banner .form{
position: absolute;
top: 50%;
left:50%;
margin-left: -225px;
z-index: 1;
}
.input{
border: #cccccc solid;
height: 25px;
width: 450px;
opacity: 1;
margin-bottom: 10px;
}
#comment{
height: 100px;
}
.submit{
border: #cccccc solid;
height: 50px;
width: 100px;
opacity: 0.5;
margin-left: 175px;
}0
收起
正在回答
2回答
你好!关于表单镂空问题 ,设置.input的背景色为background-color: transparent;
你说的是表单中的字体颜色吗?之前背景就是白色 ,把上面的背景改了再试试。
祝学习愉快!
从网页搭建入门Java Web2018版
- 参与学习 人
- 提交作业 1088 份
- 解答问题 10204 个
如果你有Java语言基础,又想以后从事Java Web开发,那么本路径是你的不二选择!本路径从网页搭建开始入手,通过大量案例来学习Java Web基础。定能助你完成Java Web小白的蜕变!
了解课程

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