- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Features of transform-origin, part 2</title>
<meta charset="utf-8">
<link rel="stylesheet" href="world.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="world homeworld">
<div class="picture-frame">
<div class="picture"></div>
</div>
<button class="btn-activate">Run</button>
</div>
</body>
</html>
CSS
.picture {
transition: transform 0.5s ease;
transform: scale(1);
}
.picture.active {
transform: scale(0.5);
}
You’ve gone to a different page
Goalscompleted
0
Change the transform-origin
values to the following for the .picture
block:
top left
.top right
.bottom left
.50% 100%
.
Press the “Run” button after each change.
Comments