- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Nested elements with backgrounds</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="block1">
<div class="block2">
<div class="block3"></div>
</div>
</div>
</body>
</html>
CSS
body {
padding-top: 80px;
}
.block1 {
width: 256px;
margin: 0 auto;
box-shadow: 1px 1px 3px #999999;
}
.block2 {
}
.block3 {
height: 256px;
}
You have moved to another page
GoalsCompleted
0
Assemble a miniature of a cat on a farm. Set up non-repeating background pictures:
cows.jpg
— for the first block,cat_walk.png
— for the second block, background position190px 195px
,fence.png
— for the third block.