zoukankan      html  css  js  c++  java
  • 属性继承~(总结类、持续更新系列)

    属性继承

         有时候你会发现给一个元素设置一些样式后,它的后代也跟着发生变化,这种扯淡的行为我们叫做属性继承。

         那么问题来了,哪些属性可以继承,哪些又不可以呢?

             可以继承的属性:1.color字体颜色a除外,a是特殊的,要改变a里面的颜色,必须直接给a设置,给a的父级设置不行

                    2.font系列,例如:font-size、font-style、font-family、font-weight 等;

                   3.文本系列,text-indent、text-align、line-height 等;

                   4.光标属性:cursor     它的值有:pointer 抓手、wait help 指针;

            不可以继承的属性:1.display;

                    2.文本属性:vertical-align、text-decoration 等;

                    3.盒子模型的属性:margin、padding、width、height、border 等;

                    4.背景属性:background、background-color、background-image、background-repeat、background-position 等;

                    5.定位属性:position、float、overflow、z-index 等;

        

  • 相关阅读:
    mysql5.7慢查询开启配置
    easyui的datagrid删除一条记录后更新出问题
    easyui跨iframe属性datagrid
    struts2笔记12-声明式异常
    struts2笔记11-OGNL
    struts2笔记10-值栈
    linux命令学习03-grep
    struts2笔记09-动态方法调用
    1、GIT简介
    玩转Python语言之4:奇技淫巧
  • 原文地址:https://www.cnblogs.com/jianger/p/9885859.html
Copyright © 2011-2022 走看看