- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The GIF Format</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box box1">
<div class="block block1"></div>
</div>
<div class="box box2">
<div class="block block2"></div>
</div>
</body>
</html>
CSS
.box {
width: 256px;
height: 192px;
margin: 20px auto;
box-shadow: 1px 1px 3px #999999;
}
.block {
height: 192px;
background-repeat: no-repeat;
background-position: 50% 50%;
}
.block1 {
}
.block2 {
}
You’ve gone to a different page
Goalscompleted
0
Assign the following non-repeating background images to the blocks:
cat_purr.gif
— To the first block,cat_walk.gif
— To the second block.
Comments