Last active
March 12, 2017 11:22
-
-
Save ktzanev/0a77f12ac1843732679d8d49e8938b35 to your computer and use it in GitHub Desktop.
hérédité en CSS ? (GistRun)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="fr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>hérédité en CSS ?</title> | |
<link rel="stylesheet" href="main.css"> | |
</head> | |
<body> | |
<div> Un div avec | |
<span id="un">un span</span> | |
</div> | |
<div> Un autre div avec | |
<span id="deux">un autre span</span> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div { | |
border: 1px solid red; | |
margin: 1em; | |
padding: 1em; | |
font-size: 2em; | |
} | |
#un { | |
border: inherit; | |
} | |
#deux { | |
font-size: initial; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment