3-8自由编程作业
来源:3-8 自由编程
Hanabie
2022-07-12 22:07:55
问题描述:
about的第二部分我不知道该怎么分配。。最后用了一串p
代码:
<body>
<header>
<div class="logo">
<img src="images/logo.png" alt="">
<ul>
<li>HOME</li>
<li>ABOUT</li>
<li>GALLERY</li>
<li>FACULTY</li>
<li>EVENTS</li>
<li>CONTACT</li>
</ul>
</div>
<nav>导航区域</nav>
</header>
<div class="banner">
<div class="banner-pic">
<img src="images/banner3.jpg" alt="">
</div>
<div class="maskview">banner遮罩层</div>
<div class="order">banner表单</div>
</div>
<div class="about">
<div class="about-part1">
<p>分割线</p>
<p>Lorem Ipsum 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-part2">
<h3>A WORD</h3>
<h3>ABOUT US</h3>
<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>
<p>EXPLORE</p>
<img src="images/bb3.jpg" alt="">
<p>70000</p>
<p>分割线</p>
<p>Students</p>
<p>600</p>
<p>分割线</p>
<p>Faculty</p>
</div>
</div>
<div class="pic-text">
<div>
<img src="images/b1.jpg" alt="">
</div>
<div>
<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>
<p>EXPLORE</p>
</div>
<div>
<img src="images/b2.jpg" alt="">
</div>
<div>
<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>
<p>EXPLORE</p>
</div>
<div>
<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>
<p>EXPLORE</p>
</div>
<div>
<img src="images/b3.jpg" alt="">
</div>
<div>
<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>
<p>EXPLORE</p>
</div>
<div>
<img src="images/b4.jpg" alt="">
</div>
</div>
<div class="gallery">
<h3>GALLERY</h3>
<div class="gallery-part1">
<p>分割线</p>
<p>Lorem Ipsum 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="gallery-part2">
<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>
<p>©2016 imooc.com 京ICP备13046642号</p>
</footer>
</body>
1回答
imooc_慕慕
2022-07-13
同学你好,整体结构是可以的,对于这个结构来说多练多敲熟练了,自然就会了,对于about部分也可以用div标签,可以参考如下代码:
优化参考如下:
Library部分可以用div标签将p标签包裹一下;
gallery部分可以将这一部分放在一起,让类名为gallery的标签包住整个部分的内容;
祝学习愉快~
相似问题