Fonction rotate() CSS
- Page précédente Fonction rgb() CSS
- Page suivante Fonction rotate3d() CSS
- Retour au niveau supérieur Manuel de fonctions CSS
Définition et utilisation
CSS rotate()
Définit la rotation 2D de l'élément cible de la fonction.
rotate()
La fonction dans transform
Utilisé dans les attributs.
Exemple
Exemple 1
Utilisez rotate()
Rotation de plusieurs éléments <div> :
#myDiv1 { transform: rotate(25deg); } #myDiv2 { transform: rotate(45deg); } #myDiv3 { transform: rotate(-45deg); }
Exemple 2
Utilisez rotate()
Rotation d'image :
#img1 { transform: rotate(90deg); } #img2 { transform: rotate(45deg); } #img3 { transform: rotate(-45deg); }
Syntaxe CSS
rotate(angle)
Valeur | Description |
---|---|
angle |
Obligatoire. Spécifiez l'angle de rotation. Unités possibles :
|
Détails techniques
Version : | Module de transformations CSS niveau 1 |
---|
Prise en charge du navigateur
Les nombres dans le tableau représentent la version du navigateur qui prend en charge pleinement cette fonction pour la première fois.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
1 | 12 | 3.5 | 3.1 | 10.5 |
Pages associées
Tutoriel :Transformation 2D CSS
Référence :Attribut transform CSS
Référence :Propriété CSS rotate
Référence :Fonction rotate3d() CSS
Référence :Fonction rotateX() CSS
Référence :Fonction rotateY() CSS
Référence :Fonction rotateZ() CSS
- Page précédente Fonction rgb() CSS
- Page suivante Fonction rotate3d() CSS
- Retour au niveau supérieur Manuel de fonctions CSS