这样写可以么
来源:4-3 小慕医生项目开发(3)
慕斯3525401
2020-11-15 09:25:24
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css/css.css">
</head>
<body>
<!-- Header区域 -->
<header>
<div class="header-top">
<div class="logo">
<img class="logo_img" src="images/logo.png" alt="">
</div>
<nav class="navigate">
<ul>
<li>HOME</li>
<li>ABOUT</li>
<li>GALLERY</li>
<li>FACULTY</li>
<li>EVENTS</li>
<li>CONTACT</li>
</ul>
</nav>
</div>
</header>
<!-- Banner区域 -->
<div class="banner">
<div class="image">
<img src="images/banner3.jpg" alt="">
</div>
<div class="mask">banner遮罩层</div>
<div class="form">
<form action="" method="post">
<input type="text" placeholder="your Name">
<input type="password" placeholder="your Password">
<input type="email" placeholder="your Email">
<textarea placeholder="Write Your Comment Here" rows="5" cols="50"></textarea>
<br />
<!-- <button type="submit">SEND MESSAGE</button> -->
<input type="submit" value="SEND MESSAGE">
</form>
</div>
</div>
<!-- About区域 -->
<div class="about">
<div class="About-top">
<div class="about-headline">
<h2>ABOUT</h2>
</div>
<hr />
<div class="about-brief">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting<br>industry. Lorem Ipsum has been the industry's standard dummy<br>text ever since the 1500s.</p>
</div>
</div>
<div class="About-bottom">
<h3>A WORD<br>ABOUT US</h3>
<div class="About-bottom-1">
<p>Praesent dignissim viverra est, sed bibendum ligula congue non. Sed ac nisl et felis gravida commodo? Suspendisse eget ullamcorper ipsum. Suspendisse diam amet.</p>
<span>EXPLORE</span>
</div>
<div class="About-bottom-2">
<img src="images/bb3.jpg" alt="">
</div>
<div class="About-bottom-right">
<div class="About-bottom-3">
<p>70000</p>
<hr />
<span>students</span>
</div>
<div class="About-bottom-4">
<p>600</p>
<hr />
<span>Faculty</span>
</div>
</div>
</div>
</div>
<!-- 图文混排区域 -->
<div class="imageAndText-mix">
<div class="image-1">
<img src="images/b1.jpg" alt="">
</div>
<div class="text-2">
<h3>Library</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<p>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<span>EXPLORE</span>
</div>
<div class="image-3">
<img src="images/b2.jpg" alt="">
</div>
<div class="text-4">
<h3>Library</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<p>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<span>EXPLORE</span>
</div>
<div class="text-5">
<h3>Library</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<p>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<span>EXPLORE</span>
</div>
<div class="image-6">
<img src="images/b3.jpg" alt="">
</div>
<div class="text-7">
<h3>Library</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<p>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<span>EXPLORE</span>
</div>
<div class="image-8">
<img src="images/b4.jpg" alt="">
</div>
</div>
<!-- Gallery区域 -->
<div class="gallery">
<div class="gallery-top">
<div class="gallery-headline">
<h2>GALLERY</h2>
</div>
<hr />
<div class="gallery-brief">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting<br>industry. Lorem Ipsum has been the industry's standard dummy<br>text ever since the 1500s.</p>
</div>
</div>
<div class="gallery-bottom">
<dl>
<dt>
<img src="images/03-01.jpg" alt="">
</dt>
<dd>Science Lab</dd>
</dl>
<dl>
<dt>
<img src="images/03-02.jpg" alt="">
</dt>
<dd>Indoor Stadium</dd>
</dl>
<dl>
<dt>
<img src="images/03-03.jpg" alt="">
</dt>
<dd>Transportation</dd>
</dl>
<dl>
<dt>
<img src="images/03-04.jpg" alt="">
</dt>
<dd>Kids Room</dd>
</dl>
<dl>
<dt>
<img src="images/03-05.jpg" alt="">
</dt>
<dd>Meditation Classes</dd>
</dl>
<dl>
<dt>
<img src="images/03-06.jpg" alt="">
</dt>
<dd>Kids Play Ground</dd>
</dl>
</div>
</div>
<!-- Footer区域 -->
<footer>
<div class="copyright">
<p>©2016 imooc.com 京ICP备13046642号</p>
</div>
</footer>
</body>
</html>
CSS代码:
* {
padding:0;
margin:0;
}
ul,ol{
list-style: none;
}
header{
width:100%;
height:80px;
background-color: #07cbc9;
}
header .header-top{
margin:0 auto;
overflow: hidden;
width:1200px;
}
header .header-top .logo{
float:left;
padding:16px 0;
}
header .header-top .logo .logo_img{
display: block;
}
header .header-top .navigate{
float:right;
}
header .header-top .navigate ul li{
float: left;
margin-right:20px;
text-align: center;
line-height: 80px;
font-size: 16px;
color:white;
}
1回答
同学你好,根据同学提交的代码来看,同学是想让老师查看顶部效果吗?如下:
这部分效果实现了哦,非常棒,继续加油!
祝学习愉快!