Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Titre du document</title> <style> div.box1 { width: 130px; height: 80px; border: 1px solid #000; background-color: #1c87c9; -ms-transform: rotate(30deg); /* IE 9 */ -webkit-transform: rotate(30deg); /* Safari 3-8 */ transform: rotate(30deg); } div.box2 { width: 120px; height: 80px; border: 1px solid #000; background-color: #8ebf42; -ms-transform: skewY(30deg); /* IE 9 */ -webkit-transform: skewY(30deg); /* Safari 3-8 */ transform: skewY(30deg); } div.box3 { width: 160px; height: 80px; border: 1px solid #000; background-color: #FFFF00; -ms-transform: scaleY(1); /* IE 9 */ -webkit-transform: scaleY(1); /* Safari 3-8 */ transform: scaleY(1); } div.box4 { width: 160px; height: 80px; border: 1px solid #000; background-color: #ccc; -ms-transform: rotate(160deg); /* IE 9 */ -webkit-transform: rotate(160deg); /* Safari 3-8 */ transform: rotate(160deg); } div.box5 { width: 160px; height: 80px; border: 1px solid #000; background-color: #990099; -ms-transform: translateX(50px); /* IE 9 */ -webkit-transform: translate(50px); /* Safari 3-8 */ transform: translateX(50px); } div.box6 { width: 160px; height: 80px; border: 1px solid #000; background-color: #FF0000; -ms-transform: skew(170deg,170deg); /* IE 9 */ -webkit-transform: skew(170deg,170deg); /* Safari 3-8 */ transform: skew(170deg,170deg); } </style> </head> <body> <h2>Exemple de la propriété transform</h2> <h3>transform: rotate(30deg):</h3> <div class="box1"></div> <br> <h3>transform: skewY(30deg):</h3> <div class="box2"></div> <br> <h3>transform: scaleY(1):</h3> <div class="box3"></div> <br> <h3>transform: transform:rotate(160deg):</h3> <div class="box4"></div> <br> <h3>transform: translateX(50px):</h3> <div class="box5"></div> <br> <h3>transform: skew(170deg,170deg):</h3> <div class="box6"></div> </body> </html>