老师您好,麻烦看下有什么需要改进的

来源:4-8 自由编程

慕仔3411021

2020-11-10 00:27:33

# 具体遇到的问题

# 报错信息的截图

# 相关课程内容截图

# 尝试过的解决思路和结果

# 粘贴全部相关代码,切记添加代码注释(请勿截图)

在这里输入代码,可通过选择【代码语言】突出显示

<!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>

    <div class="about">

        <h1>ABOUT</h1>

        <!-- 横线 -->

        <div class="line"></div>

        <div class="word-top">

            <p>Time goes by so fast, people go in and out of your life. You must never miss the opportunity to tell these people how much they mean to you.</p>

        </div>

        <!-- 下半部分 -->

        <div class="bottom">

            <div class="left">

                <h2>A WORD <br>ABOUT US</h2>

                <div class="img">

                    <img src="image/bb3.jpg">

                </div>

                <!-- 遮罩层内容 -->

                <div class="shade">

                    <p>

                        If you wish to succeed, you should use persistence as your good friend, experience as your reference, prudence as your brother and hope as your sentry.

                    </p>

                    <button type="button">

                        EXPLORE

                    </button>

                </div>

            </div>

            <div class="right">

                <div class="num">

                    <h2>70000</h2>

                    <!-- 横线 -->

                    <div class="line"></div>

                    <p>Students</p>

                </div>

                <div class="num">

                    <h2>600</h2>

                    <!-- 横线 -->

                    <div class="line"></div>

                    <p>Faculty</p>

                </div>

            </div>

        </div>

    </div>

</body>

</html>


*{

    margin0;

    padding0;

}

/* 横线 */

.line{

    width60px;

    height3px;

    background-color#07cbc9;

    margin10px auto;

}

.about{

    margin0 auto;

    padding-top30px;

}

/* 上半部分 */

.about h1{

    font-size32px;

    text-aligncenter;

}

  /*上半部分文字  */

.about .word-top{

    width350px;

    margin0 auto;

}

.about p{

    font-size14px;

    text-aligncenter;

    colorgray;

}

/* 下半部分 */

.about .bottom{

    width1200px;

    height464px;

    margin0 auto;

    padding-top30px;

}

/* 左边 */

.about .bottom .left{

    floatleft;

    positionrelative;

}

.about .bottom .left h2{

    font-size28px;

}

.about .bottom .left .img{

    positionabsolute;

    top0;

    left250px;

}

.about .bottom .left .img img{

    width650px;

    height435px;

}

/* 遮罩层 */

.about .shade{

    positionabsolute;

    left0;

    top120px;

    background:rgba(255,255,255,0.5);

    padding20px;

    border1px solid gray;

}

.about .shade p{

    width300px;

    font-size18px;

    text-alignleft;

    margin-bottom20px;

    colorblack;

}

.about .shade button{

    width140px;

    height40px;

    background-colorblack;

    colorwhite;

    bordernone;

}

/* 右边 */

.about .bottom .right{

    width260px;

    height400px;

    floatright;

}

.about .bottom .right .num{

    width258px;

    text-aligncenter;

    padding40px 0;

    border1px solid  #07cbc9;

    margin-bottom30px;

}

.about .bottom .right div h2{

    font-size28px;

}

.about .bottom .right div p{

    colorblack;

}


写回答

1回答

好帮手慕久久

2020-11-10

同学你好,效果正确,bottom中的布局可优化一下:

http://img.mukewang.com/climg/5fa9f8a609eac65c13380538.jpg
http://img.mukewang.com/climg/5fa9f8ce0979574014690547.jpg
建议同学按照该布局,再练习一下。

祝学习愉快!

0

0 学习 · 15276 问题

查看课程