The transform
property accepts functions as values. To add a function that rotates an image, we code rotate()
.
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h3>Tracebook</h3>
<p>Make sure your photo looks right before setting it as a profile image</p>
<br>
<img src="https://mimo.app/r/edd.png">
</body>
img {
transform: rotate();
}
body {
text-align: center;
}
Inside rotate( )
, we specify by how many degrees. To turn the image clockwise, we add exactly 90deg
.
<head>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h3>Tracebook</h3>
<p>Make sure your photo looks right before setting it as a profile image</p>
<br>
<img src="https://mimo.app/r/edd.png">
</body>
img {
transform: rotate(90deg);
}
body {
text-align: center;
}