Tutoriel CSS

CSS ACCUEIL Présentation CSS Syntaxe CSS Sélecteurs CSS CSS Comment faire Commentaires CSS Couleurs CSS Arrière-plans CSS Bordures CSS Marges CSS Rembourrage CSS CSS Hauteur/Largeur Modèle de boîte CSS Aperçu CSS Texte CSS Polices CSS Icônes CSS Liens CSS Listes CSS CSS Tables Affichage CSS CSS Max-width Poste CSS Index Z CSS Débordement CSS Flottant CSS Bloc en ligne CSS Alignement CSS Combinateurs CSS Pseudo-classe CSS Pseudo-élément CSS Opacité CSS Barre de navigation CSS Listes déroulantes CSS Galerie d'images CSS Sprites d'image CSS Sélecteurs d'attributs CSS Formulaires CSS Compteurs CSS Mise en page du site Web CSS Unités CSS Spécificité CSS CSS !important Fonctions mathématiques CSS

CSS avancé

Coins arrondis CSS Images de bordure CSS Arrière-plans CSS Couleurs CSS Mots-clés de couleur CSS Dégradés CSS Ombres CSS Effets de texte CSS Polices Web CSS Transformations CSS 2D Transformations 3D CSS Transitions CSS Animation CSS Info-bulles CSS CSS Style Images Réflexion d'image CSS Ajustement d'objet CSS Position d'objet CSS Masquage CSS Boutons CSS Pagination CSS CSS plusieurs colonnes Interface utilisateur CSS Variables CSS Dimensionnement des boîtes CSS Requêtes média CSS Exemples CSS MQ Boîte flexible CSS

CSS réactif

RWD Introduction Fenêtre RWD Affichage de la grille RWD Requêtes multimédia RWD Images RWD Vidéos RWD Cadres RWD Modèles RWD

Grille CSS

Grille d'introduction Conteneur de grille Élément de grille

CSS SASS

Tutoriel SASS

Exemples CSS

Modèles CSS Exemples CSS CSS Quiz Exercices CSS Certificat CSS

Références CSS

Référence CSS Sélecteurs CSS Fonctions CSS Audit de référence CSS Polices sécurisées pour le Web CSS CSS animable Unités CSS Convertisseur CSS PX-EM Couleurs CSS Valeurs de couleur CSS Valeurs CSS par défaut Prise en charge du navigateur CSS

Bordures CSS arrondies


Bordures CSS arrondies

La border-radiuspropriété est utilisée pour ajouter des bordures arrondies à un élément :

Bordure normale

Bordure ronde

Bordure plus ronde

Bordure la plus ronde

Exemple

p {
  border: 2px solid red;
  border-radius: 5px;
}

Plus d'exemples


Cet exemple illustre une propriété abrégée pour définir toutes les propriétés de la bordure supérieure dans une déclaration.


Cet exemple montre comment définir le style de la bordure inférieure.


Cet exemple montre comment définir la largeur de la bordure gauche.


Cet exemple montre comment définir la couleur des quatre bordures. Il peut avoir de une à quatre couleurs.


Cet exemple montre comment définir la couleur de la bordure droite.


Testez-vous avec des exercices

Exercer:

Utilisez la propriété raccourcie border pour définir une bordure "4px", "dotted", "red" pour les éléments <p>.

<style>
p {
  : ;
}
</style>

<body>
  <h1>This is a heading</h1>
  <p>This is a paragraph</p>
  <p>This is a paragraph</p>
</body>


Toutes les propriétés de bordure CSS

Property Description
border Sets all the border properties in one declaration
border-bottom Sets all the bottom border properties in one declaration
border-bottom-color Sets the color of the bottom border
border-bottom-style Sets the style of the bottom border
border-bottom-width Sets the width of the bottom border
border-color Sets the color of the four borders
border-left Sets all the left border properties in one declaration
border-left-color Sets the color of the left border
border-left-style Sets the style of the left border
border-left-width Sets the width of the left border
border-radius Sets all the four border-*-radius properties for rounded corners
border-right Sets all the right border properties in one declaration
border-right-color Sets the color of the right border
border-right-style Sets the style of the right border
border-right-width Sets the width of the right border
border-style Sets the style of the four borders
border-top Sets all the top border properties in one declaration
border-top-color Sets the color of the top border
border-top-style Sets the style of the top border
border-top-width Sets the width of the top border
border-width Sets the width of the four borders