banner—image不随页眉变化
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" href="CSS/common%20-%20副本.css">
<script type="text/javascript" src="JS/common.js"></script>
</head>
<body>
<div class="head">
<div class="top">
<div class="logo">
<img src="images/logo.png" alt="logo">
</div>
<div class="menu">
<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>
<div class="banner">
<div class="banner_image">
<img src="images/banner3.jpg" width=100%>
</div>
<div class="banner_comment">
<form>
<input type="text" name="Name" placeholder="Your name"/>
<br>
<input type="text" name="Phone" placeholder="Your phone"/>
<br>
<input type="text" name="Email" placeholder="Your email"/>
<br>
<input type="text" name="Name" placeholder="Your name"/>
<br>
<input type="text" name="Common" placeholder=" Write Your Comment Here"/>
<br>
<input type="button" name="submit" value="SEND MESSAGE">
<br>
</form>
</div>
</div>
</div>
<div class="content"></div>
<div class="footer"></div>
</body>
</html>
css
/*网页边距调为零*/
*{
margin: 0;
padding: 0;
}
body{
font-family:"Microsoft YaHei UI";
}
a{
text-decoration: none;
color: white;
}
.head{
margin: 0 auto;
}
.head .top {
background-color: #07cbc9;
height: 50px;
position: relative;
margin: 0 auto;
}
.head .top .logo img{
position: relative;
top:1px;
margin-left: 100px;
float: left;
/*height: 50px;*/
}
.head .top .menu{
position: relative;
float: right;
height: 50px;
/*margin: 0 auto;*/
}
.head .top .menu ul{
height: 50px;
list-style: none;
position: relative;
margin-right: 90px;
float: right;
}
.head .top .menu ul li{
float: right;
height: 50px;
margin-right: 10px;
line-height: 50px;
}
.head .top .menu ul li:hover {
background-color: black;
}
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 676 份
- 解答问题 9666 个
本阶段将从前端网页搭建入手,到Java Web基础,前后端结合助你完成Java Web小白的蜕变!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星