- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Effects with a Repeating Background</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="block block1"></div>
<div class="block block2"></div>
<div class="block block3"></div>
</body>
</html>
CSS
body {
padding-top: 40px;
}
.block {
height: 70px;
margin: 30px 50px;
background-color: #3498db;
background-repeat: repeat-x;
border-radius: 5px;
box-shadow: 1px 1px 3px #999999;
}
.block1 {
background-position: -30px 30px;
}
.block2 {
background-position: 0 0;
}
.block3 {
background-position: 0 100%;
}
You’ve gone to a different page
Goalscompleted
0
Set the following background images that repeat horizontally:
stitch.png
— To the first block,zigzag.png
— To the second block,shadow.png
— To the third block.
Comments