3-2编程这样写可以么

来源:3-1 实战分析

qq_习惯就好_30

2017-10-19 12:10:53

<!DOCTYPE html>

<html>

<head>

      <style type="text/css">

        *{

            margin:0px;

            padding:0px;

        }

        .o{

            width:770px;

            height:auto;

            border:1px solid green;

            margin: 10px;

            padding:20px;

        }

        .one{

            width: 240px;

            height:auto;

            float:left;

            border:1px solid blue;

            margin: 0px 0px 10px 10px;

        }

        .clear{clear:both;}

      </style>  <!-- 此处编写样式 -->

</head>

<body>  

    <div class="o">

        <div class="one"><img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg">欢迎来到慕课网学习知识</div>

        <div class="one"><img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg">欢迎来到慕课网学习知识</div>

        <div class="one"><img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg">欢迎来到慕课网学习知识</div>

        <div class="one"><img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg">欢迎来到慕课网学习知识</div>

        <div class="one"><img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg">欢迎来到慕课网学习知识</div>

        <div class="one"><img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg">欢迎来到慕课网学习知识</div>

        <div class="clear"></div>

    </div> 

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

</body>

</html>


写回答

1回答

樱桃小胖子

2017-10-19

效果实现的可以,但是没有设置编码声明<meta charset="utf-8">导致在浏览器中预览效果出现文字乱码现象,建议再修改一下,祝学习愉快~

0

0 学习 · 36712 问题

查看课程