zoukankan      html  css  js  c++  java
  • css_样式样式器的分类

    详情:http://www.w3school.com.cn/h.asp

    1、标签样式器:此样式器仅对html页面中div标签有效果

        div{
            background-color: rosybrown;
            font-size:20px;
        }
    

      

    2、class样式器:此样式器仅对html页面中class='cs'有效果

    .cs{
    background-color: #0095bb;
    font-size: 15px;
    }
    

     

    3、id样式器:此样式器仅对html页面中id='myid'有效果

     

    #myid{
    background-color: #333333;
    font-size: 10px;
    }
    

      

    4、级连样式器:此样式器仅对id='myid'下的p标签有效果

    #myid p {
    background-color: #333333;
    font-size: 10px;
    }
    

      

    5、组合样式器:此样式器可对input标签、div标签和p标签同时有效果

    input,div,p{
    background-color: #333333;
    font-size: 10px;
    }
    

      

    6、属性样式器:此样式器仅对input标签中的type='text'属性有效果

    input[type='text']{
    background-color: #333333;
    font-size: 10px;
    }
    

      

  • 相关阅读:
    R语言常用操作
    Java小知识点
    客户端(android,ios)与服务器通信
    图片保存数据库
    Centos 添加SWAP(交换分区)
    mysql基本知识
    php 工作模式
    apache 工作模式
    lnmp 虚拟主机配置及重写
    mysql alter的常用用法
  • 原文地址:https://www.cnblogs.com/kongzhagen/p/6120998.html
Copyright © 2011-2022 走看看