1300399 vues

CSS

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

5687 Commentaire(s)
  1. user
    ScottRib
    31/07/2026 à 08h42  commentaire modifé
    Алкоголь является сильным наркотиком, зависимость формируется и на физиологическом, и на психологическом уровне, поэтому такое состояние требует комплексной работы сразу нескольких специалистов. В лечение могут включаться нарколог, врач-терапевт, психолог, психиатр, психотерапевт, медсестры и реабилитационный персонал, которые работают с интоксикацией, абстинентным синдромом, нарушениями сна, тревогой, депрессией, поведением зависимого и переживаниями семьи. Главный вопрос здесь не в том, можно ли просто поставить капельницу, а в том, как провести полный путь от детоксикации до устойчивой трезвости. Получить дополнительную информацию - вывод из запоя на дому недорого анапа

  2. user
    single_hzOr
    31/07/2026 à 08h18  commentaire modifé
    Right — have been messing about with this thing for maybe four months now and I keep coming back, so thought I'd write something up since someone asked me a few days back. I'm UK based, mostly stick to footie and the horses, small stakes, just so you know where I'm coming from. The reason I started using it was honestly embarrassing — I couldn't ever work out what an e/w return would be with 1/5 odds a place. Basically I'd guess and moan when the payout landed. Now I type the odds in before every slip, even a simple single bet. Their single bet calculator tool is the part I open most — type in your stake, the odds and you get profit and total return straight away, fractional or decimal, doesn't matter. Same tool covers the multiples — trebles maths, lucky 15 and lucky 63, a yankee, which is where most people I know mess it up. If you want a look, it's over at acca calculator and it's free with no account nonsense. The thing that actually shifted things for me were the more serious extras. The implied probability calculator that shows what margin's baked in, and there's the kelly calculator — I use half kelly as the full version is terrifying. Dutching calculator is handy too for when I'm spreading across selections. Not all sunshine though. The design looks very functional, let's say — not much frills, looks like it was built by someone who cares more about maths than colours. On my phone it works but the acca grid make you pinch and zoom. There's no app, just the site — doesn't bother me just flagging it. So yeah. Doesn't cost anything, not plastered in adverts, does the job. Anyone who even now works out returns on a calculator app, give it a go — it's saved me a fair few dumb bets I'd have regretted.

  3. user
    Alfredmok
    31/07/2026 à 08h15  commentaire modifé
    Заявку можно оставить в любое время, специалист быстро сориентирует по дальнейшим действиям. Углубиться в тему - вывод из запоя в новороссийске

  4. user
    single_ejOr
    31/07/2026 à 08h06  commentaire modifé
    So — been on this thing for maybe five months now and I keep coming back, so figured I'd say something since a mate asked me the other day. Am based in the UK, mainly do football and horses, small stakes, for context. How I found it was honestly pretty stupid — I couldn't ever figure out what an e/w return would be with 1/5 odds a place. I'd just eyeball it and then be surprised. Now I punch the numbers in first, every time, even a simple single bet. Their single bet calculator is the bit I open most — you put in your stake, the odds and you get returns straight away, fractions or decimals. Same tool covers the multiples — trebles returns, lucky 15s, patents and yankees, and that's where I'd always got it wrong. If you want a look, it lives at singles calculator and there's no login wall, which I appreciated. One thing that genuinely made a difference is the more serious bits. They've got an odds-to-probability calculator and it makes obvious what margin's baked in, plus a kelly criterion tool — I use half kelly because full kelly is terrifying. The dutch tool is handy too if I'm spreading across selections. Couple of gripes. The interface feels a bit basic — zero frills, looks like it was built by someone who cares more about maths than colours. On my phone it's fine although the lucky 63 breakdown need a bit of scrolling. There's no app, it's a website and that's it — slight shame just flagging it. Right, that's me. Free, barely any ads, does the job. If you even now adds it up in their head, have a look — it's saved me a load of "wait, that's it?" moments.

  5. user
    RichardExpig
    31/07/2026 à 08h02  commentaire modifé
    Соблюдаем конфиденциальность, бережно общаемся с пациентом и его близкими на каждом этапе. Разобраться лучше - вывод из запоя клиника геленджик

Ajoutez un commentaire :