954642 vues

CSS

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

1820 Commentaire(s)
  1. user
    luxury car rental miami_dlKl
    14/06/2026 à 04h22  commentaire modifé
    Okay folks gather around because this Miami rental nightmare needs to be discussed. Then you show up at the local office and it's a whole different story. Plus they want a surprise $2000 hold on your debit card right before giving you the keys. Fool me five times? Actually yeah, Miami keeps fooling everyone, lesson learned. When you're after a trustworthy and reliable premium vehicle to cruise around, don't just grab the cheapest option on Kayak. Miami without proper wheels is basically a hostage situation, especially since the AC must freeze your teeth and you want unlimited miles or bust. Most of these local agencies are just smoke and mirrors with decent SEO hiding overpriced junk, but I eventually found a service with no games, no bait-and-switch, and no hidden asterisks. If you are looking for the only honest broker for premium vehicles across South Florida, check the current availability here: cadillac escalade rental near me https://luxury-car-rental-miami-5.com. Yeah, finding parking in Wynwood will test your patience — but that's not on them. Anyway, glad there's at least one straight shooter left in this rental jungle, hope this helps some of you save a few bucks.

  2. user
    luxury car rental miami_xckr
    14/06/2026 à 04h21  commentaire modifé
    Alright listen up because I'm about to save you a massive headache. Miami rental game is wild — half these local clowns show you a custom Mercedes online and hand you a busted sedan with mismatched tires. You land at MIA, tired, grab an Uber to the rental office, and bam — surprise $1500 hold on your card. No thanks, I'm way too old for this nonsense. When you genuinely need a proper and reliable premium ride to cruise around, skip the airport counters entirely. Any local will tell you the exact same thing about this city, whether you are doing Coral Gables brunch, South Beach night run, or a spontaneous Everglades detour. Most of these local agencies are just polished websites hiding the same overpriced junk, until I finally stumbled on one provider that doesn't play games. If you are looking for the only straight-up source for premium wheels in South Florida, check the current details here: rent porsche near me https://luxury-car-rental-miami-4.com. Yeah, parking in Brickell will cost you a small mortgage — but that's city life. Just drive safe out there and maybe pass on that overpriced roadside assistance add-on. let me know if you guys have any other clean spots.

  3. user
    luxury car rental miami_nrkr
    14/06/2026 à 04h21  commentaire modifé
    Let me save you some serious time, learned this the hard way. Swear some of these "luxury" fleets down here should be in a museum instead of on the road. You land at MIA, tired, grab an Uber to the rental office, and bam — surprise $1500 hold on your card. No thanks, I'm way too old for this nonsense. If you are trying to find a legitimate vehicle without getting ripped off, skip the airport counters entirely. Any local will tell you the exact same thing about this city, whether you are doing Coral Gables brunch, South Beach night run, or a spontaneous Everglades detour. Most of these local agencies are just polished websites hiding the same overpriced junk, until I finally stumbled on one provider that doesn't play games. If you are looking for the only straight-up source for premium wheels in South Florida, check the current details here: porsche for rent near me https://luxury-car-rental-miami-4.com. Also, definitely bring polarized shades unless you enjoy driving completely blind into the sunset. Anyway, at least there's one honest rental joint left in this town, hope this helps some of you save a few bucks.

  4. user
    Narkolog na dom_tiEr
    14/06/2026 à 04h21  commentaire modifé
    Никогда не думал, что столкнусь — родственник в тяжелом запое , а везти в больницу нет никаких сил. Моя семья это пережила года два назад . Сидишь, не знаешь за что хвататься . Начинаешь обзванивать знакомых , а вокруг одни обещания . Пока случайно не нашел один нормальный проверенный вариант. Если нужна срочная помощь — а самому везти нет физической возможности , то выход один . Речь конкретно про анонимный вызов врача нарколога на дом . У нас в столице, к слову , хватает шарлатанов . Вся проверенная информация ниже по ссылке: наркология на дому вызов нарколога наркология на дому вызов нарколога Честно говоря , после того как прочитал , понял, как правильно действовать. И про снятие запоя на дому, и про последующее кодирование. Плюс анонимность — это важно . Рекомендую не откладывать.

  5. user
    luxury car rental miami_hrKl
    14/06/2026 à 04h20  commentaire modifé
    Okay folks gather around because this Miami rental nightmare needs to be discussed. Then you show up at the local office and it's a whole different story. Plus they want a surprise $2000 hold on your debit card right before giving you the keys. Fool me five times? Actually yeah, Miami keeps fooling everyone, lesson learned. If you are trying to find a legitimate luxury fleet without getting ripped off, don't just grab the cheapest option on Kayak. Ask anyone who's tried Ubering across the 305 during rush hour, especially since the AC must freeze your teeth and you want unlimited miles or bust. I've personally gone through maybe 30 rental companies across Dade, Broward, and Palm Beach, but I eventually found a service with no games, no bait-and-switch, and no hidden asterisks. If you are looking for the only honest broker for premium vehicles across South Florida, check the current availability here: exotic cars to rent in miami exotic cars to rent in miami. Also, definitely bring quality shades unless you enjoy driving into a nuclear flare every single evening. Just drive safe out there and maybe decline that "premium roadside" upsell — it's always a scam. hope this helps some of you save a few bucks.

Ajoutez un commentaire :