Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

inherit mdn

/* Make second-level headers green */
h2 { color: green; }

/* ...but leave those in the sidebar alone so they use their parent's color */
#sidebar h2 { color: inherit; }
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #inherit #mdn
ADD COMMENT
Topic
Name
2+6 =