Blogger Information
Blog 49
fans 0
comment 4
visits 41723
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
盒子模型内容,padding和border的设置(时间:2019年1月16日 11:59)
过儿的博客
Original
647 people have browsed it

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=<device-width>, initial-scale=1.0">

    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>Document</title>

    <link rel="stylesheet" href="css/demo-03.css">

</head>

<body>

    <div class="box1">

        <div class="box2">


        </div>

    </div>

</body>

</html>

以下是样式文件:demo-03.css

.box1{

    width:200px;

    height:200px;

    background-color: darkred;

    /*内边距  上右下左*/

    padding:40px 30px;

    /*边框*/

    border-top-width: 2px;

    border-top-style: dashed;

    border-top-color: aqua;

    border-right-width: 3px;

    border-right-style: double;

    border-right-color:red;

    /*简写*/

    border-top:10px solid black;

    border-right: 10px dashed blue;

    border-bottom: 10px dotted gold;

    border-left:10px solid green;

    /*如果四个边一样*/

    border: 15px solid red;



}

.box2{

    width:200px;

    height:200px;

    background-color: rgb(13, 13, 112);

}

_X`6AZ5CR%TR5BG@J`]})`7.png


重点:padding后数值只要出现在第二个位置上就是左右!

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post