1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
<!doctype html>
<html dir="ltr" lang="fr-FR">
<head>
<meta charset="UTF-8" />
<title>Boîte ouverte au clic</title>
<style type="text/css">
section, p {
border: medium solid #333;
margin: 1ex;
padding: 1ex;
}
[id|="more"] { /* Toute boite commençant par "more" */
display: none; /* Est absente par défaut */
}
[id|="more"]:target { /* Toute boite ciblée commençant par "more" */
display: block; /* Est intégrée dans le flux */
}
</style>
</head>
<body>
<section>
<h2>Foo</h2>
<a href="#more-foo">Plus d'infos sur Foo</a>
<p id="more-foo">
Foo est une variable générique en informatique.
<a href="#">[Fermer]</a>
</p>
</section>
<section>
<h2>Bar</h2>
<a href="#more-bar">Plus d'infos sur Bar</a>
<p id="more-bar">
Bar, c'est Foo !
<a href="#">[Fermer]</a>
</p>
</section>
</body>
</html> |
Partager