- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Creating a Complex Background – Final Step</title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="pattern"></div>
</body>
</html>
CSS
.pattern {
height: 100%;
background-color: #333333;
background-image:
linear-gradient(135deg, white 25%, transparent 25%),
linear-gradient(225deg, white 25%, transparent 25%),
linear-gradient(45deg, white 25%, transparent 25%),
linear-gradient(315deg, white 25%, transparent 25%);
background-position:
0 0,
0 0,
0 0,
0 0;
background-size: 100px 100px;
background-repeat: no-repeat;
}
html,
body {
margin: 0;
height: 100%;
}
You’ve gone to a different page
Goalscompleted
0
- Reduce the the size of all background images to
50px
in both width and height. - Then for the first two backgrounds, set the location to
25px 0
. - Then set all background images to repeat horizontally.
- Finally, set them to repeat in all directions.
Comments