zoukankan      html  css  js  c++  java
  • 文本,背景,边距属性

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>CSS属性1</title>
        <style>
            #div1{
                background: yellow;
                text-align: center; /*居中属性align*/
                line-height: 100px; /*背景高度*/
                color: red;
                font-size: 28px;
                font-style: italic;
            }
    
            #di2{
                height: 100px;/*画面高*/
                /*background: url("520.jpg" );
                background-repeat: no-repeat;
                background-size: auto;
                background-position: center;*/
    
                /*可以简写成下面的格式,图片,不重复显示图片,间隔,颜色*/
                /*background: url("520.jpg") no-repeat red;*/
            }
    
            .div3{
                border:dashed 5px ;
                height: 200px;
                width: 30%;
                background-color: chartreuse;
            }
    
            .div4{
                margin-top: 20px;
                margin-bottom: 20px;
                border:dashed 5px ;
                height: 200px;
                width: 30%;
                background-color: chartreuse;
            }
            .div5{
                border:dashed 5px ;
                line-height: 200px;
                width: 30%;
                background-color: chartreuse;
                text-align: center;
    
            }
        </style>
    </head>
    <body>
        <div id="div1">这个是文本</div> <!--文本属性-->
    
        <div id="di2"></div> <!--背景属性-->
    
        <div class="div3">这个是div3</div>  <!--边距属性-->
        <div class="div4">这个是div4</div>
        <div class="div5">这个是div5</div>
    
    </body>
    </html>
  • 相关阅读:
    第五周的学习进度情况
    周末经历之小体会
    构建之法阅读笔记5
    第四周的学习进度情况
    hashMap中如何形成循环链表的?
    代理模式
    sharing-jdbc实现读写分离及分库分表
    分库分表
    读写分离实现方式
    MySQL主从复制
  • 原文地址:https://www.cnblogs.com/TKOPython/p/12685997.html
Copyright © 2011-2022 走看看