- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Background Size, Step 1</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: 300px;
height: 400px;
background: url("img/muffin.jpg") no-repeat #ffffff;
}
You’ve gone to a different page
Goalscompleted
0
Assign the background size background-size
to the .portrait-
block:
200px
,100%
,100% 100%
.
Comments