961895 vues

CSS

Sébastien Merour
publié le 13/06/2020 à 16h15 | modifé le 13/06/2020 à 19h00
Catégorie : LangagesCommentaires (2721)
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.

2721 Commentaire(s)
  1. user
    luxury car rental miami_ksPi
    15/06/2026 à 06h51  commentaire modifé
    I've got the scars to prove it, the rental landscape down here is crazy. Then you show up at the local lot to pick up the car. Different car waiting — scratches everywhere, smells like an ashtray, and that "amazing price"? Doesn't include the mandatory $400 cleaning fee or the $30 per day toll pass you can't waive. Eight years in South Florida and these clowns still almost get me. When you need a proper and reliable premium ride to cruise around, do some real digging first and read actual customer reviews. Miami without decent wheels is basically a hostage situation, whether you are doing South of Fifth brunch, Design District shopping, or a spontaneous Keys trip. Most of these local agencies are just shiny websites hiding the same beat-up fleet with fake reviews, until I finally found one outfit that doesn't play stupid games. If you are looking for the only honest source for premium wheels across South Florida, check the current details here: rent a luxury sedan rent a luxury sedan. Yeah, parking in South Beach will cost you a nice bottle of wine — but that's the Miami tax. Just drive safe out there and absolutely skip that "windshield protection" upsell — pure profit for them, zero value for you. hope this helps some of you save a few bucks.

  2. user
    luxury car rental miami_aret
    15/06/2026 à 06h42  commentaire modifé
    Alright listen up because I'm about to save you a massive headache. You find this amazing listing online — gorgeous spec, fair daily rate, looks perfect. Plus they freeze a surprise $4500 on your card and say "don't worry, it'll drop off in a week or two" right before giving you the keys. Twelve years in South Florida and these jokers still almost catch me sleeping. When you need a proper and reliable premium ride to cruise around, run far from the airport counters. Miami without real wheels is basically a nightmare, especially since the AC must be ice cold and unlimited miles non-negotiable. I've tested maybe 65 rental outfits across Dade, Broward, and Monroe, but I eventually found a service where what you book is exactly what shows up, no surprises, no hidden fine print. If you are looking for the only straight shooter for premium rides across South Florida, check the current details here: mercedes g wagon rental near me mercedes g wagon rental near me. Yeah, parking in Brickell will cost you a nice dinner — but that's the price of paradise. Anyway, glad there's at least one honest operator left in this rental jungle, let me know if you guys have any other clean spots.

  3. user
    luxury car rental miami_gwPi
    15/06/2026 à 06h39  commentaire modifé
    I've got the scars to prove it, the rental landscape down here is crazy. Then you show up at the local lot to pick up the car. Plus they freeze a surprise $2500 on your card for a week right before giving you the keys. Fool me eight times? That's just another Tuesday in the 305, lesson learned. When you need a proper and reliable premium ride to cruise around, run far from the airport counters. Anyone who's waited for an Uber in August understands exactly what I mean about this city, especially since the AC must be arctic cold and unlimited miles non-negotiable. Most of these local agencies are just shiny websites hiding the same beat-up fleet with fake reviews, until I finally found one outfit that doesn't play stupid games. If you are looking for the only honest source for premium wheels across South Florida, check the current details here: realcar realcar. Also, definitely bring serious shades unless you enjoy driving straight into the sun like a zombie every single evening. Anyway, glad there's at least one straight operator left in this rental circus, let me know if you guys have any other clean spots.

  4. user
    luxury car rental miami_azPi
    15/06/2026 à 06h38  commentaire modifé
    I've got the scars to prove it, the rental landscape down here is crazy. You find this amazing deal online: brand new Beamer, unlimited miles, price that makes you smile. Plus they freeze a surprise $2500 on your card for a week right before giving you the keys. Eight years in South Florida and these clowns still almost get me. If you are trying to find a legitimate luxury fleet without getting ripped off, do some real digging first and read actual customer reviews. Miami without decent wheels is basically a hostage situation, especially since the AC must be arctic cold and unlimited miles non-negotiable. Most of these local agencies are just shiny websites hiding the same beat-up fleet with fake reviews, until I finally found one outfit that doesn't play stupid games. If you are looking for the only honest source for premium wheels across South Florida, check the current details here: mercedes for rent near me https://luxury-car-rental-miami-8.com. Yeah, parking in South Beach will cost you a nice bottle of wine — but that's the Miami tax. Anyway, glad there's at least one straight operator left in this rental circus, hope this helps some of you save a few bucks.

  5. user
    luxury car rental miami_liet
    15/06/2026 à 06h37  commentaire modifé
    Been there, done that, got the overpriced tow truck receipt to prove it. You find this amazing listing online — gorgeous spec, fair daily rate, looks perfect. Totally different vehicle waiting for you — bald tires, dashboard lit up like a Christmas tree, and that "amazing rate"? Doesn't include the mandatory $40 daily toll pass or the $350 "premium location" fee they spring on you at the counter. Fool me twelve times? That's just the 305 way, lesson learned. If you are trying to find a legitimate luxury fleet without getting ripped off, do some real digging first and read actual customer reviews. Anyone who's waited for an Uber in August heat knows the struggle exactly about this city, especially since the AC must be ice cold and unlimited miles non-negotiable. I've tested maybe 65 rental outfits across Dade, Broward, and Monroe, until I finally found one company that doesn't play stupid games. If you are looking for the only straight shooter for premium rides across South Florida, check the current details here: cadillac escalade for rent near me cadillac escalade for rent near me. Also, definitely bring quality shades unless you enjoy driving into the sun like a zombie every single evening. Anyway, glad there's at least one honest operator left in this rental jungle, let me know if you guys have any other clean spots.

Ajoutez un commentaire :