Site Tools


informatique:web:css

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

informatique:web:css [2024/10/16 14:08] – created yahikoinformatique:web:css [2024/11/25 10:48] (current) yahiko
Line 1: Line 1:
 ====== CSS ====== ====== CSS ======
 +===== Thème clair / sombre automatiquement =====
 +<code css>
 +/* Thème sombre par défaut, je suis trop dark tavu */
 +:root {
 + --txt-color: #bababa;
 + --bg-color: #252526;
 + --body-font: 'Georgia', serif;
 +}
 +
 +/* thème clair */
 +@media (prefers-color-scheme: light) {
 + :root {
 + --bg-color: #eff2f8;
 + --txt-color: #333333;
 + }
 +}
 +
 +body {
 + background-color: var(--bg-color);
 + color: var(--txt-color);
 + font-family: var(--body-font);
 +}
 +</code>
 +
 ===== Coller un chat en coin de page ===== ===== Coller un chat en coin de page =====
 Ça fonctionne aussi avec autre chose qu'un chat. Ça fonctionne aussi avec autre chose qu'un chat.
Line 5: Line 29:
 Voir [[https://www.erreur503.xyz|Erreur503]] ou [[http://blog.erreur503.xyz|le blog]]. Voir [[https://www.erreur503.xyz|Erreur503]] ou [[http://blog.erreur503.xyz|le blog]].
  
-<codedoc code:css>+<code css>
 body { body {
  background: no-repeat bottom right fixed url("img/cat.png");  background: no-repeat bottom right fixed url("img/cat.png");
 } }
-</codedoc>+</code> 
 + 
informatique/web/css.1729087722.txt.gz · Last modified: 2024/10/16 14:08 by yahiko