zoukankan      html  css  js  c++  java
  • CSS的属性

    一,可继承属性
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>CSS的可继承属性</title>
    <style>
    body {
    color: red;
    font-size: 30px;
    }
    </style>
    </head>
    <body>
    <div>我是块级标签</div>
    <span>我是行内标签</span>
    <button>我是行内-块级标签</button>
    </body>
    </html>

    二。不可继承属性
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>CSS不可继承属性</title>
    <style>
    #main {
    font-weight:bold;">yellow;
    100px;
    height: 200px;
    }
    .text1 {
    font-weight:bold;">rebeccapurple;
    }
    </style>
    </head>
    <body>
    <div id="main">
    <div class="text1">我是里边的</div>
    </div>
    </body>
    </html>

    三。一些常用的属性
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>CSS的一些常用的属性</title>
    <style>
    div {
    font-weight:bold;">rebeccapurple;
    200px;
    height: 100px;
    /*属性规定元素是否可见*/
    /*visibility: hidden;*/
    /*display: none;*/
    /*规定显示光标的类型(形状)*/
    cursor: help;
    font-family: "sans-serif";
    font-weight: bolder;
    }
    p {
    font-weight:bold;">yellow;
    }
    </style>
    </head>
    <body>
    <div>我是div标签</div>
    <p>我是段落标签</p>
    </body>
    </html>


  • 相关阅读:
    Study Plan The Twelfth Day
    Study Plan The Fifteenth Day
    Study Plan The Seventeenth Day
    Study Plan The Tenth Day
    Study Plan The Eighth Day
    Study Plan The Eleventh Day
    Study Plan The Sixteenth Day
    Study Plan The Thirteenth Day
    Study Plan The Fourteenth Day
    Study Plan The Ninth Day
  • 原文地址:https://www.cnblogs.com/r360/p/5826766.html
Copyright © 2011-2022 走看看