Blogger Information
Blog 20
fans 0
comment 0
visits 14176
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
盒模型学习-2019年1月14日22点52分
kszyd的博客
Original
725 people have browsed it

盒模型基础知识实践,padding与简写,css调用等。

实例

<!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">
    <link rel="stylesheet" href="static/css/style02.css">
    <title>盒模型</title>
</head>
<body>
    <div class="box1">
        <div class="box2"></div>
    </div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

css:

实例

.box1 {
    width: 200px;
    height: 300px;
    background-color: beige;
    /* 内边距,上右下左 */
    /* padding-top: 20px;
    padding-right: 30px;
    padding-bottom: 40px;
    padding-left: 50px; */
    padding: 20px 30px 40px 50px;
    /* border-top-style: solid;
    border-top-color: blue; */
    border-bottom: 20px solid blue;
}
.box2 {
    height: inherit;
    background-color: brown;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

使用了calss选择器,对页面进行简单布局。

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