- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Muffin’s Eco-Frame</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(0, 0, 0, 0.4);
background:
url("img/glasses.svg") no-repeat 75px 125px,
url("img/muffin.jpg") no-repeat center #ffffff;
background-clip: padding-box;
background-origin: border-box;
background-size:
150px,
cover;
}
You’ve gone to a different page
Goalscompleted
0
- For the portrait, assign the
border-image-slice
property with a value of60
to the frame background imageimg/eco-frame.png
, - and then assign the property
border-image-repeat
with therepeat
value - and the
round
value.
Comments