266073 vues

CSS

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

1550 Commentaire(s)
  1. user
    WilliamPet
    07/05/2025 à 04h48  commentaire modifé
    Spintax Version of the Text: Uncover the Top-Rated Beauty and Aesthetic Center in Austin, Texas: Icon Clinic. Located in the lively center of TX, this renowned clinic has gained recognition as a premier destination for those looking to improve their natural beauty. Backed by expert practitioners committed to excellence, this clinic provides a tailored approach that ensures every client feels appreciated, empowered, and glowing. Whether you’re looking to refresh your appearance or opt for enduring enhancements, this iconic clinic is the perfect solution for achieving ageless beauty. --- Customized Care for Every Client Upon arriving at Icon Beauty Clinic, you’ll notice the focus on personalized attention. All services is tailored to meet your unique needs, using only high-quality materials and state-of-the-art techniques. The skilled professionals takes the time to understand your goals, ensuring that each procedure not only enhances your natural features but also matches your daily habits. --- Let’s Explore Some of the Standout Services That Make Icon Beauty Clinic a Innovator in the Aesthetic Field. Brow and Lash Perfection Boost the inherent charm of your eyes with an eyelash transformation. This service adds volume, extension, and clarity to your lashes, eliminating the need for daily mascara application. Ideal for hectic schedules or important events, the results last for an extended period, giving you naturally stunning eyes every day. Plump Lips Treatment Sensual, voluminous lips are a evergreen look, and your trusted beauty expert offers hyaluronic acid injections designed to deliver subtle yet stunning results. Using safe, skin-friendly solutions, the procedure refines the structure and size of your lips, creating a youthful and sensual appearance that lasts half a year to a full year. Eyelash Extensions For those who want striking, eye-catching looks, eyelash extensions are the ideal choice. These long-lasting enhancements add depth to your look, lasting for an extended period without the need for regular care. Whether you opt for understated elegance or eye-popping drama, the experts at your beauty partner will customize the ideal match for you. Microblading Services Austin, TX One of the most sought-after services at Icon Beauty Clinic is permanent makeup eyebrows. If you’re ready for effortless brows every morning, this cutting-edge solution offers a lasting solution. Using advanced microblading techniques, the expert technicians create beautifully defined arches that enhance your overall appearance. Permanent makeup eyebrows in Texas have become a popular choice for today’s beauty enthusiasts seeking effortless beauty. Anti-Aging Injections As we age, our skin naturally shows signs of aging. This trusted clinic offers a range of injectable treatments, including facial and lip fillers, to restore youthfulness. These minimally invasive treatments reduce wrinkles, plump areas of volume loss, and leave your skin looking revitalized and glowing. Tattoo Removal If you’re eager to eliminate an unwanted tattoo or outdated permanent makeup, your trusted beauty partner provides cutting-edge removal solutions. Using cutting-edge laser technology, these treatments effectively fade and erase ink without surgery, leaving your skin rejuvenated. --- What Sets Icon Apart? What truly distinguishes Icon Beauty Clinic apart is its dedication to quality. The team combines skill, advancement, and a dedication to enhancing beauty to deliver results that exceed expectations. Each aspect, from the friendly environment to the meticulous execution of each procedure, reflects their promise of offering an exceptional journey. If you’re from Austin or on a trip to Texas, your chosen beauty destination is your destination for life-changing enhancements. Their wide range of services, including microblading brows in the Austin area, ensures that you can achieve the style you desire. --- Final Thoughts This exceptional clinic isn’t just about enhancing your appearance—it’s about helping you to feel beautiful in your own skin. By offering personalized care and cutting-edge treatments, the clinic helps you realize your true beauty. Don’t wait to invest in yourself. Book an appointment to discover how their skilled expertise, including microblading brows in the Austin area, can elevate your confidence. Your quest for radiance starts here. --- Key Takeaway: This top-rated clinic in Austin, TX is renowned for its exceptional aesthetic services, including semi-permanent brow artistry, dramatic lashes, lip fillers, and tattoo removal. With a commitment to individualized attention and skilled craftsmanship, it’s the perfect place for achieving ageless allure.

  2. user
    bono de bienvenida coolbet
    07/05/2025 à 04h29  commentaire modifé
    El bono de bienvenida coolbet es uno de los mas atractivos para jugadores peruanos. Con solo registrarte y hacer tu primer deposito, puedes recibir un bono que te permitira jugar mas y aumentar tus oportunidades de ganar. Ya sea que prefieras apostar en deportes o jugar en el casino, este bono se adapta a tus gustos. Ademas, Coolbet ofrece condiciones justas para liberar el bono, lo que significa que realmente puedes aprovecharlo sin complicaciones. ?Empieza a jugar con ventaja desde el primer dia!

  3. user
    DanielCam
    06/05/2025 à 02h25  commentaire modifé
    Awesome news for all us

  4. user
    Ismaelhet
    05/05/2025 à 17h02  commentaire modifé
    Hello, always i used to check web site posts here in the early hours in the daylight, since i love to find out more and more. http://kpu-kiev.org.ua/yak-pravylno-vybyraty-stekla-far-dlya-riznykh-typi.html

  5. user
    Joker81
    05/05/2025 à 07h25  commentaire modifé

    Mau cari tempat bermain tembak ikan atau slot online? Cobain deh joker81. Serunya nggak ada habisnya!


Ajoutez un commentaire :