- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Multiple 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’ve gone to a different page
Goalscompleted
0
Let’s create a “Cat on the Farm” miniature. Set the following non-repeating background images:
- cows.jpg— To the first block,
- cat_walk.png— To the second block, with a background position of- 190px 195px,
- fence.png— To the third block.
Comments