为什么改动我的大容器边框在浏览器中没有反应呢?

来源:4-11 编程练习

Joey_yxy

2020-06-20 16:49:24

<!DOCTYPE html>

<html>

<head>

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

        <style>

            #father{

                width:1000px;

                height:440px;

                border:dashed;

            }

            #div1{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

            }

            #div2{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:0px;

                top:210px;

 

            }

            #div3{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:270px;

            }

            #div4{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:270px;

                top:210px;

            }

            #div5{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:540px;

                top:0px;

            }

            #div6{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:540px;

                top:210px;

                

            }

        </style>

</head>

<body>   

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

    <div id="father">

        <div id="div1">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div2">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div3">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div4">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div5">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div6">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

    </div>

</body>

</html>

<!DOCTYPE html>

<html>

<head>

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

        <style>

            #father{

                width:1000px;

                height:440px;

                position:absolute;

                border:dashed;

            }

            #div1{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

            }

            #div2{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:0px;

                top:210px;

 

            }

            #div3{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:270px;

            }

            #div4{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:270px;

                top:210px;

            }

            #div5{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:540px;

                top:0px;

            }

            #div6{

                width:240px;

                height:180px;

                position:absolute;

                float:left;

                border:solid;

                border-color:gray;

                padding:10px;

                margin:10px;

                left:540px;

                top:210px;

                

            }

        </style>

</head>

<body>   

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

    <div id="father">

        <div id="div1">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div2">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div3">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div4">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div5">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

        <div id="div6">

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

            <p>欢迎来到慕课网学习新知识</p>

        </div>

    </div>

</body>

</html>



写回答

2回答

好帮手慕阿慧

2020-06-20

同学你好,大容器边框设置,如下:

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

运行结果如下:

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

如果我的回答解决了你的疑惑,请采纳!祝学习愉快~

0

Joey_yxy

提问者

2020-06-20

发现了。。我重复粘贴了两次。。。

0

0 学习 · 16556 问题

查看课程