请老师检查

来源:2-7 编程练习

木子小可爱

2019-08-12 12:41:18

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">    
    <title>CSS布局</title>
    <style type="text/css">
/*此处写代码*/
        
        *{
            padding:0;
            margin:0;
        }
        .container{
            width:1000px;
            margin:0 auto;
            position:relative;}
         h3{
             padding-top:30px;
             font-size:30px;
             font-weight:bold;text-align:center;
         }
        .container dl{
            float:left;
            width::50%;
        }
        .left{position:absolute;left:50px;}
        .right{position:absolute;right:50px;}
 
    </style>
</head>
<body>
    <!-- 此处写代码 -->
    
        <div class="container">
            <h3>ENJIOY THE LIFE</h3>
            <dl class="left">
            <dt>
            <img src="http://climg.mukewang.com/58f829090001a4b504260240.jpg"/></dt>
            <dd>
            Life is like a book, just read more and more <br/>
            refined,more and heart more carefully. When read,<br/>
            mind open,all things have been indifferernt to<br/>
            heart. Life is the precipition</dd></dl>
             <dl class="right">
            <dt>
             <img src="http://climg.mukewang.com/58f8290f0001558804260240.jpg"/></dt>
             <dd>Life is like a couple of tea, let people lead a<br/>
             person to endless after tastes.You agian food<br/>
             taste,it will always have a different taste<br/>
             different people will have different taste more.</dd></dl>
         </div>
    
</body>
</html>

写回答

1回答

好帮手慕嘟嘟

2019-08-12

同学你好,

老师运行了你的代码,效果是正确的,继续努力哦~

如果还有疑惑,可以在问答区再次提问,我们会继续为你解答的。

如果我的回答帮助了你欢迎采纳,祝学习愉快~


0

0 学习 · 40143 问题

查看课程