644230 vues

CSS

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

15138 Commentaire(s)
  1. user
    1xbet giris_drKi
    23/10/2025 à 01h15  commentaire modifé
    1x bet giri? 1x bet giri? .

  2. user
    RogelioUNOMB
    23/10/2025 à 00h51  commentaire modifé

  3. user
    drone_jyOa
    22/10/2025 à 22h17  commentaire modifé
    Recently the company drone lights show put on an amazing performance that amazed all the spectators. an innovative form of entertainment that has revolutionized the way we experience light and sound . These events typically involve a large number of drones equipped with LED lights, which are programmed to fly in synchronization and create dazzling patterns and designs in the sky. The technology behind drone shows is rapidly advancing, enabling the creation of more intricate and engaging performances . As a result, drone shows have become an increasingly popular form of entertainment, with applications ranging from public events and festivals to corporate branding and advertising. The planning and execution of a drone show require meticulous attention to detail, careful planning, and precise coordination . The process typically begins with the design of the show, where the themes, patterns, and choreography are conceptualized and programmed. This is followed by the preparation of the drones, which involves installing the necessary software, calibrating the drones, and conducting safety checks. The actual performance involves the simultaneous operation of multiple drones, which are controlled by sophisticated software that ensures precise synchronization, flawless execution, and real-time adjustments . Drone shows have a wide range of applications, from education and research, where they can be used to demonstrate complex concepts and principles. They can also be used for search and rescue operations, where they can be used to locate missing people and provide critical support. Furthermore, drone shows can be integrated with other forms of entertainment, such as music and dance, to create a multisensory experience . The versatility and creativity of drone shows have made them an attractive option for marketers, who are seeking to create a lasting impression on their customers . The use of drone shows for entertainment purposes has revolutionized the way we experience live events, providing a new and exciting form of entertainment . Drone shows can be integrated with other forms of entertainment, such as fireworks, laser shows, and concerts . The popularity of drone shows has also driven the growth of the drone industry, with advancements in technology and regulatory frameworks. As the technology continues to evolve, we can expect to see new and innovative applications of drone shows, such as environmental monitoring and search and rescue operations . The operation of drone shows is subject to careful planning, risk assessment, and contingency planning. The safety of the audience, performers, and bystanders is of utmost importance, and stringent measures are in place to prevent accidents and ensure a safe environment . The regulatory framework for drone shows is improving, with greater clarity and consistency in regulatory frameworks. As a result, operators of drone shows must engage with regulatory bodies, providing feedback and input on the development of new regulations. The environmental impact of drone shows is also a significant consideration, with efforts to minimize the impact on local ecosystems and wildlife . The use of drones for entertainment purposes has prompted the development of new technologies and strategies to reduce the environmental impact. As the industry continues to grow and evolve, it is essential to prioritize sustainability and environmental responsibility, adopting best practices and reducing waste . By doing so, the drone show industry can ensure a sustainable future, minimizing its impact on the environment . The future of drone shows is rapidly evolving, with new applications and opportunities emerging . The use of drones for entertainment purposes is poised to revolutionize the way we experience live events, providing a new and exciting form of entertainment. The development of new technologies, such as augmented reality, virtual reality, and mixed reality , will improve the overall experience of attendees, providing a more immersive and engaging experience. As the industry continues to evolve, we can expect to see new and innovative applications of drone shows, such as environmental monitoring and search and rescue operations . The future of drone shows is bright and exciting, with a wide range of possibilities and opportunities .

  4. user
    1xbet giris_hbKi
    22/10/2025 à 19h58  commentaire modifé
    1xbetgiri? www.1xbet-giris-7.com/ .

  5. user
    1xbet giris_vqKi
    22/10/2025 à 19h34  commentaire modifé
    1xbet turkiye https://1xbet-giris-7.com/ .

Ajoutez un commentaire :