作业问题

来源:4-11 编程练习

慕用4915122

2020-12-14 21:49:46

<!DOCTYPE html>

<html>

<head>

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

        <style type="text/css">

            div{

                float: left;

                margin: 20px;

                outline:1px solid;  

            }

             #name0{

                width: 840px;

                outline:1px dotted;

            }

            p{

                line-height: 0px

            }

        </style>

</head>

<body>   

        <div id="name0">

            <div id="name1">

                <img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg">

                <p>欢迎来到慕课网</p>

            </div>

             <div id="name2">

                <img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg">

                <p>欢迎来到慕课网</p>

            </div>

             <div id="name3">

                <img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg">

                <p>欢迎来到慕课网</p>

            </div>

            <div id="name4">

                <img src="http://climg.mukewang.com/590fe9770001e63102400135.jpg">

                <p>欢迎来到慕课网</p>

            </div>

             <div id="name5">

                <img src="http://climg.mukewang.com/590fe97d00011bda02400135.jpg">

                <p>欢迎来到慕课网</p>

            </div>

             <div id="name6">

                <img src="http://climg.mukewang.com/590fe982000150ba02400135.jpg">

                <p>欢迎来到慕课网</p>

            </div>

        </div>  

</body>

</html>

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

老师,中间位置和边框位置怎么调才能一样啊?


写回答

1回答

好帮手慕阿慧

2020-12-15

同学你好,同学可以设置#name1和#name4的margin-left为40px,修改父div的宽度为880px。

参考代码如下:

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

0

0 学习 · 16556 问题

查看课程