老师辛苦看下是否正确

来源:2-7 编程练习

weixin_慕设计5025467

2020-05-21 19:36:48

<!DOCTYPE html>

<html>

<head>

    <meta charset="utf-8">

<title>CSS布局</title>

<style type="text/css">

/*此处写代码*/

    *{padding:0;margin:0;}

    .container{

        width:1000px;

        height:600px;

        margin:0 auto;

    }

.container .top{

    padding-top:50px;

    text-align:center;

    font-size:35px;

    font-weight:bolder;

    font-family:"微软雅黑";

}

.container .middle{

    

    width:1000px;

        height:300px;

        text-align:center;

}

.container .middle .left{

    float:left;

    padding-left:80px;

}

.container .middle img{

    width:400px;

    height:300px;

    

}

.container .middle .right{

    float:right;

    padding-right:80px;

}

.clearfixed{

    clear:both;

}

.container .bottom{

    /*background:red;*/

    width:1000px;

        height:100px;

        text-align:left;

        font-size:14px;

        margin-top:3px;

}

.container .bottom .word-l{

    width:400px;

    height:100px;

    float:left;

    padding-left:80px;

    

}

.container .bottom .word-r{

    width:400px;

    height:100px;

    float:right;

    padding-right:80px;

    

}

</style>

</head>

<body>

<!-- 此处写代码 -->

<div class="container">

    <div class="top">ENJOY THE LIFE</div>

    <div class="middle">

        <div class="left"><img src="http://climg.mukewang.com/58f829090001a4b504260240.jpg"/></div>

        <div class="right"><img src="http://climg.mukewang.com/58f8290f0001558804260240.jpg"/></div>

        <div class="clearfixed"></div>

    </div>

    <div class="bottom">

        <div class="word-l">dfa fadfda afdaf afadf af afda ds adfa df adf asdf asdf asf asdf asdf adf asdf asdf asdf asdf asdf asdf asdf adsf </div>

        <div class="word-r">dfa fadfda afdaf afadf af afda ds adfa df adf asdf asdf asf asdf asdf adf asdf asdf asdf asdf asdf asdf asdf adsf</div>

    </div>

</div>

</body>

</html>


写回答

1回答

好帮手慕码

2020-05-22

同学你好,代码效果正确。继续加油,祝学习愉快~

0

0 学习 · 40143 问题

查看课程