- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>background-repeat: space</title>
<meta charset="utf-8">
<link rel="stylesheet" href="setting.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="portrait"></div>
</body>
</html>
CSS
.portrait {
margin: 20px auto;
width: 400px;
height: 400px;
background-color: #ffffff;
background-image: url("img/muffin.jpg");
background-size: 150px;
background-repeat: repeat;
}
You’ve gone to a different page
Goalscompleted
0
- Set a repeating background with the
repeat space
value to the portrait, - and then assign
space
. - Then assign a width of
500px
to the portrait.
Comments