649057 vues

CSS

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

15172 Commentaire(s)
  1. user
    zimnie_bvSn
    08/09/2025 à 13h51  commentaire modifé
    Если вы ищете [url=https://kupit-zimnie-shipovannie-shini.ru/]зимние шины шипованные|зимняя резина шипованная|резина зимняя шипованная|купить шины шипованные|купить шипованные шины|купить шипованную резину|шины зимние шипованные купить|зимняя резина шипованная купить|зимняя шипованная резина спб|шипованные шины цена|купить зимнюю шипованную резину в санкт петербурге|автошины шипованные|шипованная резина зима|автошины зимние шипованные|недорогая зимняя шипованная резина|недорогая шипованная резина|авторезина шипованная|шипованная резина новая купить|купить зимнюю резину в спб недорого шипованную|покрышки зимние шипованные купить спб[/url], у нас есть отличный выбор по доступным ценам! почему стоит использовать шипованные шины

  2. user
    rubber_vsPi
    08/09/2025 à 13h40  commentaire modifé
    Service rubber stamp maker online|stamp making online|rubber stamp online maker|stamp maker|online stamp maker|stamp maker online|stamp creator online|make a stamp online|make stamp online|online stamp design maker|make stamps online|stamps maker|online stamp creator|stamp online maker|stamp online maker free|stamp maker online free|create stamp online free|stamp creator online free|online stamp maker free|free online stamp maker|free stamp maker online|make stamp online free allows you to create and order stamps online. The internet has made it easier for people to access rubber stamp makers and create their own custom stamps. The process of creating a rubber stamp online is straightforward and requires minimal effort the user can choose from a variety of options, including the size and material of the stamp. The rubber stamp maker online is a great resource for businesses and individuals who need to create custom stamps for their documents . users can create and order their stamps from anywhere with an internet connection . The online rubber stamp maker also offers a wide range of design options and templates . users can create their own custom stamps at a fraction of the cost of traditional methods . How to Use a Rubber Stamp Maker Online they will be guided through the process of designing and ordering their custom stamp . The first step in using a rubber stamp maker online is to choose a design or template . they will be asked to provide their contact and payment information . The rubber stamp maker online also offers a variety of customization options . users can use these tools to create their own custom designs . it is ideal for businesses, individuals, and organizations that need to create custom stamps for their documents . Benefits of Using a Rubber Stamp Maker Online this makes it ideal for people who are short on time or have busy schedules. The online rubber stamp maker also offers a wide range of design options and templates . it reduces the need for physical stores and minimizes waste . this can help to establish their brand and create a professional image. the tools include features such as social media integration and email marketing. users can contact the customer support team for assistance with their order . Conclusion In conclusion, the rubber stamp maker online is a revolutionary tool that allows users to create custom rubber stamps from the comfort of their own homes . The online rubber stamp maker is a great resource for businesses, individuals, and organizations that need to create custom stamps for their documents . the website is easy to navigate and provides clear instructions. The rubber stamp maker online is also a cost-effective way to create custom stamps . users can choose from a variety of fonts, colors, and images to create their custom stamp . The rubber stamp maker online is a great resource for anyone who needs to create custom stamps .

  3. user
    RobertAxore
    08/09/2025 à 13h36  commentaire modifé
    Добрый день! Тебя выкинули с работы как ненужного? что делать если уволили с работы Забей, есть план как превратить это в новые возможности. По ссылке: - https://zhit-legche.ru/chto-delat-esli-uvolili-s-raboty/ уволился с работы что делать если уволили с работы увольнение с работы Пока!

  4. user
    Seosug
    08/09/2025 à 11h49  commentaire modifé
    Linking to your site using redirect site analyzers. backlink building In this task, I recommend to submit your web resource on analyzer sites not through a connection in a text file, but to embed it in the analyzer programs themselves and share the resulting backlinks in blogs and comments so that Google recognizes the linking through credibility. Such references are beneficial for the website. The number of backlinks on analyzer sites is 50 links, I will place prepared links in blog discussions in the number that you select from three variants. This further boosts the authority of your web project and is very good for Google. Only the main page of the site is added in the analysis tools, other pages are not added. For these backlinks we get variety. An example of how your website will be displayed and what reference will be posted on the forums. This integration is reliable for your online resource. I also give references to the placed website on analyzer sites.

  5. user
    Williamsug
    08/09/2025 à 11h24  commentaire modifé
    SEO LINKS 10 000 I have a powerful server backlink building Inbound links of your site on community platforms, sections, threads. The 3-step backlinking method Stage 1 – Simple backlinks. Phase 2 – Backlinks through redirects from authoritative sites with PageRank PR 9–10, for example – Stage 3 – Listing on SEO analysis platforms – The advantage of link analysis platforms is that they highlight the Google search engine a website structure, which is very important! Explanation for the third stage – only the main page of the site is added to analyzers, other pages cannot be included. I execute all phases step by step, resulting in 10,000–20,000 inbound links from the full process. This linking tactic is most effective. Example of submission on analyzer sites via a TXT file.

Ajoutez un commentaire :