286956 vues

CSS

Sébastien Merour
publié le 13/06/2020 à 16h15 | modifé le 13/06/2020 à 19h00
Catégorie : LangagesCommentaires (2905)
CSS
Description

Le CSS (Cascading Styles Sheets) est un langage informatique permettant de décrire le style, la présentation d'un document HTML. Là où le HTML va se contenter de structurer un document, le CSS va prendre en charge le style, la mise en page d'une page web.

En réalité, le HTML n'a jamais eu besoin du langage CSS pour être exécuté sur un navigateur web. Cependant, le CSS est devenu rapidement une nécessité afin de séparer ce qui relève purement et simplement de la structure d'une page web (c'est le rôle du HTML), de ce qui relève de la mie en page (formes, couleurs, polices de caractères....).

Le style d'une page web peut être défini de 3 façons :

-soit directement dans la page HTML (avec par exemple la balise style, située dans la partie HEAD de la page)

-soit en mode inline (exemple : utilisation de la balise strong pour mettre en gras un texte)

-soit grâce à un fichier CSS, référencé dans la section HEAD de la page.

Il est évident qu'il est préférable d'utiliser la 3ème méthode. En effet : imaginons qu'un développeur souhaite modifier complètement le design d'un site web, sans pour autant modifier la structure des pages web. C'est là que le fichier CSS a son intérêt : le développeur pourra modifier le style du site en ne modifiant que le fichier CSS du site. Ce sera d'autant plus utile si le site web contient de très nombreuses pages.

Il est possible également qu'une page web ou qu'un site fasse appel à plusieurs fichiers CSS. Par exemple, il est fréquent de voir un fichier CSS différent pour chaque taille d'écran, afin de rendre un site 100% responsive.

Par ailleurs, le CSS est devenu de plus en plus puissant au fil des années. Désormais, le CSS permet d'afficher par exemple des animations, ou des graphiques particulièrement complexes.

Les sélecteurs

Le principe du CSS repose sur la sélection : on sélecte un élément (par exemple un type de balise, ou bien une balise possédant un identifiant) pour lui appliquer un style. On pourra par exemple appliquer une couleur rouge pour tous les titres de type H3.

Box Model

Tous les élements HTML (une image, un paragraphe, un formulaire...) peut être considéré comme une boîte. Pour définir cette boîte, on utilise 4 élements :

- Margin (Marge - l'espace qui est en dehors de la bordure)

- Border (Bordure - la bordure qui est autour du padding)

- Padding (Ecart - l'écart entre le contenu et la bordure)

- Content (Contenu - par exemple le texte et les images)

Grid

Grid est un principe CSS permettant d'afficher un Layout en mode "grille". Le développeur peut utiliser ce principe pour positionner des éléments dans une grille, en faisant varier par exemple la taille de chaque case, ou l'orientation de chaque rangée, etc...

Pour afficher un layout en mode Grid, il est nécessaire d'insérer l'instruction display: grid

Flexbox

Auparavant, nous avions 4 formats de Layouts possibles :

- Block, pour les sections d'une page

- Inline, pour le texte

- Table, pour afficher un tableau

- Positioned, pour positionner explicitement un élément.

L'arrivée du concept du Flexbox facilite la création de layout, sans avoir à utiliser les notions de float ou de position.

Pour activer la notion de flexbox sur un élément, il est nécessaire d'appliquer un affichage flex avec l'instruction display: flex

Les proprités d'un conteneur Flex sont les suivantes :

flex-direction

flex-wrap

flex-flow

justify-content

align-items

align-content

Fonctionnalités
Style / Mise en page
Date de création
17/12/1996
Créateur
W3C
Dernière version
3
Langage
CSS
Liens
Aux dernières nouvelles
Depuis 2010, CSS est censé évoluer vers sa version 4. Mais suite au succès de HTML 5 couplé avec CSS 3, il est possible que CSS 4 ne voit jamais le jour, où bien que la notion de version (5 pour HTML et 3 pour CSS) disparaisse, pour devenir des langages en constante évolution.

2905 Commentaire(s)
  1. user
    KevinPaf
    31/05/2025 à 08h42  commentaire modifé
    ¡Hola, amantes del ocio y la suerte ! En apuestassinlicencia la experiencia de usuario es personalizada y adaptada a las preferencias individuales. casas de apuestas espaГ±a sin licencia Las promociones son frecuentes y diseГ±adas para fidelizar a los jugadores. Esto crea un ambiente competitivo y atractivo para apostar. Casas de apuestas EspaГ±a sin licencia con retiros rГЎpidos sin esperas - https://www.apuestas-sin-licencia.net/ Muchas casas no reguladas permiten dividir tu banca entre varias cuentas, algo Гєtil para jugadores avanzados. ¡Que disfrutes de partidas triunfales !

  2. user
    vapefrofe
    31/05/2025 à 05h32  commentaire modifé
    vape supplier singapore Vaping in Singapore: More Than Just a Trend In today’s fast-paced world, people are always looking for ways to unwind, relax, and enjoy the moment — and for many, vaping has become a daily habit. In Singapore, where modern life moves quickly, the rise of vaping culture has brought with it a stylish escape. It's not just about the devices or the clouds of vapor — it's about flavor, convenience, and finding your own vibe. Disposable Vapes: Simple, Smooth, Ready to Go Let’s face it — nobody wants to deal with complicated setups all the time. That’s where disposable vapes shine. They’re perfect for those who value simplicity who still want that satisfying hit without the hassle of charging, refilling, or replacing parts. Popular models like the VAPETAPE UNPLUG / OFFGRID, LANA ULTRA II, and SNOWWOLF SMART HD offer thousands of puffs in one sleek little package . Whether you're out for the day or just need something quick and easy, these disposables have got your back. New Arrivals: Fresh Gear, Fresh Experience The best part about being into vaping? There’s always something new around the corner. The latest releases like the ELFBAR ICE KING and ALADDIN ENJOY PRO MAX bring something different to the table — whether it’s smarter designs . The ELFBAR RAYA D2 is another standout, offering more than just puff count — it comes with adjustable airflow , so you can really make it your own. Bundles: Smart Choices for Regular Vapers If you vape often, buying in bulk just makes sense. Combo packs like the VAPETAPE OFFGRID COMBO or the LANA BAR 10 PCS COMBO aren’t just practical — they’re also a cost-effective option . No more running out at the worst time, and you save a bit while you're at it. Flavors That Speak to You At the end of the day, it’s all about taste. Some days you want something icy and refreshing from the Cold Series, other times you're craving the smooth, mellow vibes of the Smooth Series. Then there are those sweet cravings — and trust us, the Sweet Series delivers. Prefer the classic richness of tobacco? There’s a whole series for that too. And if you're trying to cut back on nicotine, the Nicotine-Free Range gives you all the flavor without the buzz. Final Thoughts Vaping in Singapore isn’t just a passing trend — it’s a lifestyle choice for many. With so many options available, from pocket-sized disposables to customizable devices, there's something for everyone. Whether you're exploring vaping for the first time , or an experienced user , the experience is all about what feels right to you — uniquely yours .

  3. user
    BruceFap
    31/05/2025 à 04h20  commentaire modifé

  4. user
    Keithlok
    31/05/2025 à 03h32  commentaire modifé
    פנימה, לחץ על קש — והכוס עבדה. תנועות רכות וחודרות עמוקות, פעימות איטיות, צפיפות נעימה בפנים. קולות רחוקים-נעלם. נותרו רק הם, נשימתם, שפתיהם, גופם, עדיין בוערים מהאינטימיות האחרונה. אלנה click for source

  5. user
    vapefrofe
    31/05/2025 à 02h51  commentaire modifé
    vape singapore Vape Scene in Singapore: Embracing Modern Relaxation In today’s fast-paced world, people are always looking for ways to unwind, relax, and enjoy the moment — and for many, vaping has become a preferred method . In Singapore, where modern life moves quickly, the rise of vaping culture has brought with it a fresh way to relax . It's not just about the devices or the clouds of vapor — it's about flavor, convenience, and finding your own vibe. Disposable Vapes: Simple, Smooth, Ready to Go Let’s face it — nobody wants to deal with complicated setups all the time. That’s where disposable vapes shine. They’re perfect for people on the move who still want that satisfying hit without the hassle of charging, refilling, or replacing parts. Popular models like the VAPETAPE UNPLUG / OFFGRID, LANA ULTRA II, and SNOWWOLF SMART HD offer thousands of puffs in one easy-to-use device. Whether you're out for the day or just need something quick and easy, these disposables have got your back. New Arrivals: Fresh Gear, Fresh Experience The best part about being into vaping? There’s always something new around the corner. The latest releases like the ELFBAR ICE KING and ALADDIN ENJOY PRO MAX bring something different to the table — whether it’s enhanced user experience. The ELFBAR RAYA D2 is another standout, offering more than just puff count — it comes with dual mesh coils, so you can really make it your own. Bundles: Smart Choices for Regular Vapers If you vape often, buying in bulk just makes sense. Combo packs like the VAPETAPE OFFGRID COMBO or the LANA BAR 10 PCS COMBO aren’t just practical — they’re also a cost-effective option . No more running out at the worst time, and you save a bit while you're at it. Flavors That Speak to You At the end of the day, it’s all about taste. Some days you want something icy and refreshing from the Cold Series, other times you're craving the smooth, mellow vibes of the Smooth Series. Then there are those sweet cravings — and trust us, the Sweet Series delivers. Prefer the classic richness of tobacco? There’s a whole series for that too. And if you're trying to cut back on nicotine, the Zero-Nicotine Line gives you all the flavor without the buzz. Final Thoughts Vaping in Singapore isn’t just a passing trend — it’s a lifestyle choice for many. With so many options available, from pocket-sized disposables to customizable devices, there's something for everyone. Whether you're exploring vaping for the first time , or a seasoned vaper , the experience is all about what feels right to you — uniquely yours .

Ajoutez un commentaire :