- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Multiple Background Images</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 {
box-sizing: border-box;
margin: 20px auto;
padding: 40px;
width: 400px;
height: 400px;
border: 40px solid rgba(255, 255, 0, 0.4);
background-color: #ffffff;
background-image: url("img/muffin.jpg");
background-position: center;
background-clip: padding-box;
background-origin: border-box;
background-size: cover;
background-repeat: no-repeat;
}
You’ve gone to a different page
Goalscompleted
0
- Add a background image to the portrait in the upper layer:
img/glasses.svg
, - assign it the dimensions
150px
- and the position
75px 125px
.
Comments