2235635 vues

CSS

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

59215 Commentaire(s)
  1. user
    ohrana v moskovskoi oblasti_xnst
    26/10/2026 à 12h06  commentaire modifé
    Выбирал подрядчика по охране загородного дома в Московской области — оказалось, много нюансов. Неплохо работают частные охранные предприятия, но нужно смотреть отзывы. По теме охрана частного дома в московской области http://xn-----8kcgn0amogfbcgmjveq0ce8jk.xn--p1ai/ohrana-v-moskovskoi-oblasti/ советую присмотреться к профильным компаниям — у них есть круглосуточный мониторинг и быстрый выезд группы. Для коттеджных посёлков это очень удобно, особенно если дом используется сезонно. Главное — проверить лицензии и уточнить детали договора. Я остановился на надёжной компании с хорошими отзывами — за полгода никаких проблем. Кому интересно, могу подсказать контакты.

  2. user
    ohrana v moskovskoi oblasti_hzst
    26/10/2026 à 12h06  commentaire modifé
    Искал варианты по охране загородного дома в Московской области — оказалось, много нюансов. Хорошо работают ЧОПы, но важно смотреть опыт. По вопросу охрана частного дома в московской области советую обратить внимание к специализированным компаниям — там есть пультовая охрана и оперативное реагирование. Для коттеджных посёлков это очень удобно, особенно если дом используется сезонно. Важно — убедиться в наличии разрешений и уточнить детали договора. Мой выбор на проверенной фирме с положительной репутацией — за полгода всё отлично. Кому интересно, могу посоветовать варианты.

  3. user
    tenobet_muMl
    26/10/2026 à 12h06  commentaire modifé
    I've been using Tenobet since about March, and I suppose I've got a fair bit of history to actually comment. Stumbled on it through a mate of mine who was after somewhere with decent game coverage without all the deposit limit nagging you get now on the UK licensed sites. Right, important bit: it's not UKGC licensed and it isn't on GamStop, which will matter to some of you a lot. The lobby is genuinely big — about 3,500+ titles last I looked, and the usual heavy hitters all turn up: Pragmatic, Net Ent, Play n GO, Big Time Gaming, Betsoft, Microgaming's back catalogue. Mainly I grind Sweet Bonanza and Book of Dead, which both behave properly on mobile browser. Live side is all Evolution, so you know what you're getting — proper croupiers, the game shows like Crazy Time if that's your thing. There's a sportsbook too, which gets a bit of use from me for the football, decent odds, nothing groundbreaking. Bonus-wise it's a 100% match to ?125 with 100 free spins, you have to use the code JOIN002 at deposit — I nearly forgot it the first time. Read the wagering before you commit, the requirement is not amazing but not predatory either. Don't expect free credit without depositing that I could find. For the what's running currently, have a look over on tenobet if you're curious. Minimum deposit is ?10, signing up took about three minutes. Cashouts have been generally fine for me. Cards go through, e-wallets like Skrill and Neteller are supported, and crypto if you prefer. Skrill withdrawals have come through same day twice; cards were slower, 3-4 days. What did wind me up was KYC — took a day and a half to clear my documents, so the first cashout just sat there the whole time. Not a scam, just slow. Other gripes: no native app, which means mobile browser only. It's responsive enough on my iPhone but an app would be nicer. The login sometimes gets fiddly around weekend evenings. Customer service at Tenobet is fine — maybe five minutes to get a human, but the opening messages feel a bit scripted. Get past the script and they sort it.

  4. user
    tenobet_bkMl
    26/10/2026 à 11h59  commentaire modifé
    I've been using Tenobet for February, and I figure I have a fair bit of history to give an honest take. Found it off a mate who was after something with decent game coverage that didn't have all the affordability nonsense you run into now on the UK licensed sites. Should flag early: it's not UK Gambling Commission licensed and it isn't on GamStop, and that cuts both ways. Lobby's pretty huge — somewhere around 4,000+ games last I looked, with the providers that matter all turn up: Pragmatic Play, NetEnt, Play n GO, BTG, Betsoft, Microgaming. Mainly I stick to Sweet Bonanza and Sweet Bonanza, which both run fine in browser. Live dealer's all Evolution, so it's exactly what you expect — real croupiers, Crazy Time and Lightning Roulette for a change of pace. There's a sportsbook too, and it I've used a handful of times on the football, it's fine, nothing more. Bonus-wise it's a 100% match to ?125 and 100 free spins, you'll want the code JOIN002 at deposit or it won't trigger. Read the wagering before you commit, it's not amazing but not predatory either. There's no no-deposit bonus unfortunately. If you want to see current promos, you'll find them over on tenobet before you sign up. Min deposit's ?10, the form took maybe two minutes. Money side's been the stronger part in my experience. Visa/Mastercard go through, Skrill and Neteller are supported, Bitcoin and a few other coins if you prefer. E-wallet withdrawals have landed within a day; card payouts took slower, 3-4 days. The one thing that annoyed me was the verification — they took 36-48 hours to verify me, and my first withdrawal sat waiting the whole time. Not dodgy, just a bit of a wait. Other gripes: no native app, which means the mobile site. Works fine on my iPhone but I do miss having one. Logging in sometimes gets a bit slow around weekend evenings. Support's live chat, English, decent, though the first replies read like templates. Push past that and they sort it.

  5. user
    RodolfoVom
    26/10/2026 à 11h58  commentaire modifé
    Probably the best thing I have read on this topic in the past month, and a stop at urbanfernmarket extended that ranking, the casual ranking of recent reading is informal but real and this site has been winning those rankings for me on this topic specifically over the last several weeks of regular reading sessions.

Ajoutez un commentaire :