zoukankan      html  css  js  c++  java
  • css 分析

    .important.warning {background:silver;}
    .important .warning {background:silver;}
    //上面有什么区别?
    //1、2个选择器同时过滤选择出同一个元素
    //2、2个选择器,是父子关系

    选择器的关系

    派生:前一个选择的是后一个的父节点。(中间间隔是空格)

    li strong {
        font-style: italic;
        font-weight: normal;
      }
    .important .warning {background:silver;}
    p .important {color:red;}

    共享:前一个和后一个选择器共同筛选出一个元素。(中间没有间隔)

    .important.warning {background:silver;}
    p.important {color:red;}

    分组:多个选择器,分享相同的声明,样式相同。(中间间隔是逗号)

    h1,h2,h3,h4,h5,h6 {
      color: green;
      }
  • 相关阅读:
    bootstrap初识
    司徒正美居中方式
    css中的浮动(float)
    fio
    简易接口测试脚本
    字符加密
    Python 汉诺塔
    Python 找零问题
    Python 二分法
    Python 冒泡排序
  • 原文地址:https://www.cnblogs.com/tiandi/p/3843759.html
Copyright © 2011-2022 走看看