• 盒子模型


     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
        <title>盒子模型</title>
        
        <style type="text/css" media="screen" id="test">
            div{
                width:300px;
                height:300px;
                border: 1px solid #999;
                border-top-color:red;
                border-bottom-color:yellow;
    
    
    
                /*水平对齐方式*/
                text-align:center;
    
    
    
                /*字体大小*/
                font-size:50px;
    
    
    
                /*内边距的大小*/
                padding-top: 100px;
    
    
                /*外边距的大小*/
                margin-top:200px;
            }
            .test1{
                background-color:red;
    
                /*浮动*/
                float:left;
            }
            .test2{
                font-style:italic;
                float:left;
            }
            .test3{
                background-color: rgb(255,0,0);
                font-weight:800;
                float:right;
            }
        </style>
    </head>
    <body>
        <div id="test" class="test1">
            这是div1
        </div>
        <div id="test" class="test2">
            这是div2
        </div>
        <div id="testf" class="test3">
            这是div3
        </div>
    </body>
    </html>

  • 相关阅读:
    弹性盒子模型属性之flex-shrink
    Git----基本操作
    Git----简介
    ES6常用语法
    nginx学习
    Shell基础命令(二)
    Linux目录
    Shell基础命令(一)
    CRM之分页
    Django之ModelForm组件
  • 原文地址:https://www.cnblogs.com/chenchen-12/p/10153058.html
Copyright © 2020-2023  润新知