- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Shrinking items proportionally</title>
<link href="course.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body class="world world-flat">
<div class="spot">
<div class="skate no-width racoon-green"></div>
<div class="skate no-width racoon-brown"></div>
<div class="ruler ruler-green w-200">200px</div>
<div class="ruler ruler-brown w-100 l-200">100px</div>
<div class="ruler ruler-negative w-200 l-300">−200px</div>
</div>
</body>
</html>
CSS
.spot {
display: flex;
margin-left: 30px;
padding: 10px 0;
width: 300px;
height: 200px;
}
.racoon-green {
flex-shrink: 0;
flex-basis: 250px;
}
.racoon-brown {
flex-shrink: 0;
flex-basis: 250px;
}
You’ve gone to a different page
Goalscompleted
0
- Assign
flex-shrink
values to the raccoons so that their width is equal to the width of the bars.
In this assignment you can only change the values of flex-shrink
,
Comments