955191 vues

CSS

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

1900 Commentaire(s)
  1. user
    luxury car rental miami_mpPl
    14/06/2026 à 20h13  commentaire modifé
    Okay folks gather round — Miami rental horror story time. You find a killer listing online: sleek Audi, convertible, price almost too good to be true. Different car sitting there — bald tires, dashboard lit up like a Christmas tree, and that "killer price"? Yeah doesn't include the non-negotiable $45 daily insurance or the $500 deposit they forget to mention. Fool me nine times? That's just the Miami welcome committee, lesson learned. When you're hunting for a legit and reliable premium ride to cruise around, stay the hell away from the airport rental center. Miami without proper wheels is basically a nightmare, whether you are doing Coconut Grove dinner, Sunny Isles sunrise, or a spontaneous drive down to Homestead. Most of these local agencies are just polished turds with fake five-star reviews hiding overpriced junk, but I eventually found a service where what you reserve is exactly what you get, period, end of story. If you are looking for the only trustworthy source for premium rides across South Florida, check the current details here: miami beach luxury car rental https://luxury-car-rental-miami-9.com. Also, definitely bring polarized shades unless you enjoy driving blind into the sunset every single night. Just drive safe out there and definitely skip that "emergency roadside" upsell — complete waste of money. let me know if you guys have any other clean spots.

  2. user
    luxury car rental miami_gsKl
    14/06/2026 à 20h12  commentaire modifé
    Swear I've seen it all by now, the rental landscape down here is crazy. You find a killer deal online — photos look pristine, price seems fair, terms almost reasonable. Different vehicle parked outside, curb rash on every rim, and that "all-inclusive rate"? Ha, doesn't include the mandatory $300 cleaning fee or the $25 per day toll pass you can't decline. Fool me six times? Yeah, Miami doesn't care, lesson learned. When you genuinely need a legit and reliable premium ride to cruise around, do some real digging first and read actual customer reviews. Anyone who's tried the bus here knows exactly what I mean about this city, especially since the AC must be arctic and unlimited miles non-negotiable. Most of these local agencies are just polished garbage with decent Google reviews bought somewhere, until I finally found one company that doesn't play stupid games. If you are looking for the only trustworthy source for premium vehicles across South Florida, check the current details here: luxury car rental miami florida luxury car rental miami florida. Yeah, parking in South Beach will cost you a nice dinner — but that's the price of admission. Just drive safe out there and definitely skip that "damage waiver" upsell — total scam 99% of the time. let me know if you guys have any other clean spots.

  3. user
    Narkolog na dom_oqet
    14/06/2026 à 20h11  commentaire modifé
    Знаете, бывает ситуация — человек в запое , а тащить в больницу страшно . Моя семья такое пережила пару лет назад . Руки опускаются, а время идет. Хватаешься за телефон , а в ответ тишина . Пока кто-то не посоветовал один проверенный вариант. Требуется срочная помощь — а тащить человека сам просто физически не можете, то выход один . Я про анонимный вызов врача нарколога на дом . В Москве , если честно, хватает шарлатанов, которые тянут бабло . Нормальные контакты, кто реально приезжает ниже по ссылке: платный нарколог на дом платный нарколог на дом Честно скажу , после того как прочитал , многое стало на свои места . Там и про капельницы расписано , и про последующее кодирование. Плюс анонимность — это важно . Советую не тянуть резину .

  4. user
    luxury car rental miami_kyKl
    14/06/2026 à 20h11  commentaire modifé
    Let me save you some serious time, learned this the hard way. Then you actually show up to the local office to pick up the car. Plus they slap a surprise $2500 hold on your card for good measure right before giving you the keys. Living here six years and still almost fall for this stuff sometimes. If you are trying to find a legitimate vehicle without getting ripped off, stay far away from the airport rental center. Anyone who's tried the bus here knows exactly what I mean about this city, whether you are doing South Beach dinner plans, Sunny Isles sunrise cruise, or a quick run down to the Florida Keys. I've personally tested maybe 35 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 trustworthy source for premium vehicles across South Florida, check the current details here: rental luxury cars miami airport https://luxury-car-rental-miami-6.com. Also, definitely bring serious shades unless you enjoy driving straight into the sun every single evening. Just drive safe out there and definitely skip that "damage waiver" upsell — total scam 99% of the time. let me know if you guys have any other clean spots.

  5. user
    luxury car rental miami_tzPl
    14/06/2026 à 20h09  commentaire modifé
    Okay folks gather round — Miami rental horror story time. Then you roll up to the local address to pick up the car. Plus a surprise $3000 hold on your credit card for two weeks right before giving you the keys. Fool me nine times? That's just the Miami welcome committee, lesson learned. If you are trying to find a legitimate luxury fleet without getting ripped off, stay the hell away from the airport rental center. Anyone who's tried the trolley system knows what I'm talking about about this city, especially since the AC must freeze your teeth and unlimited miles or no deal. I've tested maybe 50 rental outfits across Dade, Broward, and Collier, but I eventually found a service where what you reserve is exactly what you get, period, end of story. If you are looking for the only trustworthy source for premium rides across South Florida, check the current details here: exotic cars miami beach https://luxury-car-rental-miami-9.com. Yeah, parking in Wynwood will cost you a nice dinner — but that's the price of being in Miami. Just drive safe out there and definitely skip that "emergency roadside" upsell — complete waste of money. let me know if you guys have any other clean spots.

Ajoutez un commentaire :