这个代码可以么

来源:3-8 自由编程

慕斯3525401

2020-10-30 07:12:27

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

</head>

<body>

    <!-- Header区域 -->

    <header>

        <div class="logo">

            <img src="images/logo.png" alt="">

        </div>

        <nav>

            <ul>

                <li>HOME</li>

                <li>ABOUT</li>

                <li>GALLERY</li>

                <li>FACULTY</li>

                <li>EVENTS</li>

                <li>CONTACT</li>

            </ul>

        </nav>

    </header>

    <!-- Banner区域 -->

    <div class="banner">

        <div class="image">

            <img src="images/banner3.jpg" alt="">

        </div>

        <div class="mask">banner遮罩层</div>

        <div class="form">banner表单</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-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 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>&copy;2016 imooc.com 京ICP备13046642号</p>

        </div>

    </footer>

</body>

</html>


写回答

1回答

好帮手慕慕子

2020-10-30

同学你好,代码实现是可以的,建议优化:如下图所示区域,可以使用一个div包裹,作为一个整体。

http://img.mukewang.com/climg/5f9b8d190996c3a710920386.jpg

http://img.mukewang.com/climg/5f9b8d460960d38606090379.jpg

祝学习愉快~

0

0 学习 · 15276 问题

查看课程