Your Search Results


    この記事はまだ日本語に翻訳されていません。MDN の翻訳はボランティアによって行われています。是非 MDN に登録し、私たちの力になって下さい。


    The unset CSS keyword is the combination of the initial and inherit keywords. Like these two other CSS-wide keywords, it can be applied to any CSS property, including the CSS shorthand all. This keyword resets the property to its inherited value if it inherits from its parent or to its initial value if not. In other words, it behaves like the inherit keyword in the first case and like the initial keyword in the second case.


     /* give headers a green border */
     h2 { border: medium solid green }
     /* but make those in the sidebar use the value of the "color" property (initial value) */
     #sidebar h2 { border-color: unset; }
     <p style="color:red"> 
        this text is red 
           <em style="color:initial"> 
              this text is in the initial color (e.g. black)
        this is red again


    Specification Status Comment
    CSS Cascading and Inheritance Level 3
    The definition of 'unset' in that specification.
    Candidate Recommendation Initial definition

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support 41 27 (27) Not supported Not supported Not supported
    Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
    Basic support Not supported 27.0 (27) Not supported Not supported Not supported

    See also

    The CSS-wide property values: initial, inherit and unset.


    Contributors to this page: myakura, teoli
    最終更新者: myakura,