老师这样写可以吗
来源:4-11 自由编程
慕田峪8130438
2021-03-16 16:14:35
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css.css">
</head>
<body>
<!-- header页头区域 -->
<header>
<div class="box1">
<!-- logo区域 -->
<h1 class="logo">Career Buider</h1>
<!-- 导航栏区域 -->
<nav>
<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>
</nav>
</div>
</header>
<!-- banner横幅区域 -->
<div class="banner">
<div><img src="素材/banner3.jpg" alt="sucai"></div>
<div class="box2">banner遮罩层区域</div>
<div class="box3">
<form>
<input type="text" placeholder="your Name">
<input type="text" placeholder="your Phone">
<input type="text" placeholder="your Email">
<textarea cols="30" rows="10" placeholder="Welte Your Conment Here"></textarea>
<input type="submit" value="SEND MESSAGE">>
</form>
</div>
</div>
<!-- about区域 -->
<div class="box4">
<div class="about-top">
<h2>ABOUT</h2>
<div class="box5"></div>
<P>borem lpsum is simply dummy text of the printing and typesetting</P>
<P>industry.Lorem Ipsum has been the industry's standard dummy</P>
<P>text ever since the 1500s</P>
</div>
<div class="about-bottom">
<div class="title">
<h2>A WORD</h2>
<h2>ABOUT US</h2>
</div>
<div class="img"><img src="素材/bb3.jpg" alt=""></div>
<div class="box6">
<p>Praesent dignissim viverra est,sed</p>
<p>bibendum ligula congue non Sed</p>
<p>ac nisl et felis gravida commodo?</p>
<p>Suspendisse eget Ulโamcorper</p>
<p>ipsum. Suspendisse diam amet.</p>
<input type="button" value="EXPLORE">
</div>
<div class="box7">
<p class="p1">7000</p>
<div></div>
<p>students</p>
</div>
<div class="box8">
<p class="p1">600</p>
<div></div>
<p>Faculty</p>
</div>
</div>
</div>
<!-- 图片混合区域 -->
<div class="box9">
<div><img src="素材/b1.jpg" alt=""></div>
<div class="border">
<h3>Library</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<div>Lorem !psบm has been the industy's standard dummy 1ext eve! since the 1500s, when an unknown printer took อ galley of type and scrambled เ t๐ mnake ล typp spelimen book.</div>
<input class="button" type="submit" value="EXPLORE">
</div>
<div><img src="素材/b2.jpg" alt=""></div>
<div class="border">
<h3>Library</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<div>Lorem !psบm has been the industy's standard dummy 1ext eve! since the 1500s, when an unknown printer took อ galley of type and scrambled เ t๐ mnake ล typp spelimen book.</div>
<input class="button" type="submit" value="EXPLORE">
</div>
<div class="border">
<h3>Library</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<div>Lorem !psบm has been the industy's standard dummy 1ext eve! since the 1500s, when an unknown printer took อ galley of type and scrambled เ t๐ mnake ล typp spelimen book.</div>
<input class="button" type="submit" value="EXPLORE">
</div>
<div><img src="素材/b3.jpg" alt=""></div>
<div class="border">
<h3>Library</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry</p>
<div>Lorem !psบm has been the industy's standard dummy 1ext eve! since the 1500s, when an unknown printer took อ galley of type and scrambled เ t๐ mnake ล typp spelimen book.</div>
<input class="button" type="submit" value="EXPLORE">
</div>
<div><img src="素材/b4.jpg" alt=""></div>
</div>
<!-- gallery区域 -->
<div class="gallery">
<div class="gollery-top">
<h2>GALLERY</h2>
<div class="box5"></div>
<P>borem lpsum is simply dummy text of the printing and typesetting</P>
<P>industry.Lorem Ipsum has been the industry's standard dummy</P>
<P>text ever since the 1500s</P>
</div>
<div class="gollery-bottom">
<div>
<dl>
<dt><img src="素材/03-01.jpg" alt=""></dt>
<dd>Science Lab</dd>
</dl>
<dl>
<dt><img src="素材/03-02.jpg" alt=""></dt>
<dd>Indoor Stadium</dd>
</dl>
<dl>
<dt><img src="素材/03-03.jpg" alt=""></dt>
<dd>Transportation</dd>
</dl>
<dl>
<dt><img src="素材/03-04.jpg" alt=""></dt>
<dd>Kids Room</dd>
</dl>
<dl>
<dt><img src="素材/03-05.jpg" alt=""></dt>
<dd>Meditation Classes</dd>
</dl>
<dl>
<dt><img src="素材/03-06.jpg" alt=""></dt>
<dd>Kids Play Ground</dd>
</dl>
</div>
</div>
</div>
<!-- footer页脚区域 -->
<p class="footer">©2016imooc.com京ICP备13046642号</p>
</body>
</html>
问题描述:css
* {
margin: 0;
padding: 0;
}
/* 头部区域 */
a {
text-decoration: none;
display: block;
}
header {
height: 80px;
background-color: #07cbc9
}
header .box1 {
width: 1200px;
height: 80px;
overflow: hidden;
margin: 0 auto;
}
.logo {
float: left;
line-height: 80px;
color: #fff;
}
/* 导航栏 */
nav {
float: right;
}
nav ul li {
display: inline-block;
line-height: 80px;
font-size: 12px;
list-style: none;
margin-left: 20px;
}
nav ul li a {
color: #fff;
}
/* 横幅区域 */
.banner {
width: 100%;
height: 600px;
position: relative;
}
[alt] {
width: 100%;
height: 600px;
}
div .box2 {
width: 100%;
height: 600px;
position: absolute;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
}
div .box3 {
width: 504px;
height: 600px;
position: absolute;
top: 50%;
left: 50%;
margin: -300px 0 0 -252px;
}
/* 表格区域 */
form {
width: 504px;
margin-top: 100px;
}
[type="text"] {
display: block;
width: 502px;
height: 38px;
border: 1px solid #808080;
background: none;
outline: none;
margin-bottom: 20px;
color: #808080;
}
form textarea {
display: block;
width: 502px;
height: 110px;
border: 1px solid #808080;
background: none;
outline: none;
margin-bottom: 25px;
color: #808080;
}
[type="submit"] {
display: block;
width: 200px;
height: 40px;
border: 1px solid #808080;
background: none;
outline: none;
margin: 0 auto;
color: #808080;
}
/* about区域 */
.box4 {
width: 1201px;
margin: 0 auto;
}
.box4 .about-top {
text-align: center;
}
.box4 .about-top h2 {
font-size: 32px;
padding-top: 30px;
line-height: 32px;
}
.box4 .about-top .box5 {
width: 60px;
height: 3px;
background-color: #07cbc9;
margin: 20px auto;
}
.box4 .about-top p {
color: gray;
font-size: 14px;
}
.box4 .about-bottom {
width: 1201px;
height: 464px;
overflow: hidden;
position: relative;
}
.box4 .about-bottom .title {
margin-top: 30px;
position: absolute;
top: 0%;
left: 0%;
}
.box4 .about-bottom .img img {
width: 650px;
height: 435px;
float: left;
margin: 30px 0 0 275px;
}
.box4 .about-bottom .box6 {
width: 300x;
float: left;
padding: 20px;
font-size: 18px;
border: 1px solid gray;
background: rgba(255, 255, 255, 0.5);
position: absolute;
top: 50%;
margin: -100px 0 0 0;
}
.box4 .about-bottom .box6 input {
width: 140px;
height: 40px;
background-color: #000000;
color: #fff;
outline: none;
border: 1px solid #000000;
margin-top: 30px;
font-size: 16px;
}
.box4 .about-bottom .box7 {
width: 260px;
height: 100px;
float: right;
margin-top: 20px;
padding: 40px 0;
background: none;
border: 1px solid #07cbc9;
}
.box4 .about-bottom .box7 .p1 {
font-weight: 700;
font-size: 28px;
text-align: center;
}
.box4 .about-bottom .box7 div {
width: 60px;
height: 3px;
background-color: #07cbc9;
margin: 20px auto;
}
.box4 .about-bottom .box7 p {
font-size: 18px;
text-align: center;
}
.box4 .about-bottom .box8 {
width: 260px;
height: 100px;
float: right;
margin-top: 30px;
padding: 40px 0;
background: none;
border: 1px solid #07cbc9;
}
.box4 .about-bottom .box8 .p1 {
font-weight: 700;
font-size: 28px;
text-align: center;
}
.box4 .about-bottom .box8 div {
width: 60px;
height: 3px;
background-color: #07cbc9;
margin: 20px auto;
}
.box4 .about-bottom .box8 p {
font-size: 18px;
text-align: center;
}
/* 混合区域 */
.box9 {
width: 100%;
overflow: hidden;
margin-top: 20px;
}
.box9 div img {
width: 25%;
height: 380px;
float: left;
}
.box9 .border {
width: 25%;
height: 380px;
float: left;
background-color: #07cbc9;
}
.box9 .border h3 {
color: #fff;
font-size: 24px;
margin-bottom: 30px;
padding: 20px 0 0 20px;
}
.box9 .border p {
color: #fff;
font-size: 16px;
margin-bottom: 20px;
margin-left: 20px;
}
.box9 .border div {
color: gray;
margin-bottom: 30px;
padding: 0 20px;
}
.box9 .border .button {
height: 40px;
width: 138;
background-color: #000000;
color: #fff;
font-size: 18px;
}
/* gallery区域 */
.gallery {
height: 100%;
}
.gallery .gollery-top {
text-align: center;
width: 100%;
}
.gallery .gollery-top h2 {
font-size: 32px;
padding-top: 30px;
line-height: 32px;
}
.gallery .gollery-top .box5 {
width: 60px;
height: 3px;
background-color: #07cbc9;
margin: 20px auto;
}
.gallery .gollery-top p {
color: gray;
font-size: 14px;
}
.gallery .gollery-bottom {
width: 100%;
height: 653px;
position: relative;
}
.gallery .gollery-bottom div {
width: 1200px;
height: 653px;
position: absolute;
left: 50%;
margin-left: -600px;
}
.gallery .gollery-bottom div dl {
float: left;
position: relative;
}
.gallery .gollery-bottom div dl dt img {
width: 360px;
height: 290px;
margin: 30px 20px 0;
}
.gallery .gollery-bottom div dl dd {
position: absolute;
bottom: 0;
left: 0;
height: 50px;
width: 340px;
background-color: #000;
margin-left: 20px;
color: #fff;
line-height: 50px;
padding-left: 20px;
}
/* 页脚部分 */
.footer {
width: 100%;
height: 80px;
text-align: center;
background-color: #07cbc9;
line-height: 80px;
font-size: 18px;
margin-top: 40px;
}
1回答
好帮手慕夭夭
2021-03-16
同学你好,可以的,代码实现正确。继续加油,祝学习愉快~