- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>The “stack” of cards</title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="deck">
<img class="ten" src="cards/10.png" alt="Ten">
<img class="jack" src="cards/jack.png" alt="Jack">
<img class="queen" src="cards/queen.png" alt="Queen">
<img class="king" src="cards/king.png" alt="King">
</div>
</body>
</html>
CSS
body {
margin: 0;
padding: 0;
background-color: #f5f5f5;
}
.deck {
position: relative;
top: 150px;
left: 50%;
width: 110px;
margin-left: -55px;
}
.deck img {
position: absolute;
transition: all 0.1s linear;
transform-origin: 0 0;
}
.queen {
}
.jack {
}
.ten {
}
You’ve gone to a different page
Goalscompleted
0
- Rotate the
.queen
card10°
counterclockwise. - Then rotate the
.jack
card20°
counterclockwise. - And finally rotate the
.ten
card30°
counterclockwise.
Comments