- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Muffin’s Round Frame, Part 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: 50px auto;
width: 300px;
height: 300px;
outline: 5px solid white;
border: 50px solid transparent;
background-color: rgba(255, 255, 255, 0.4);
background-image: url("img/muffin-3.jpg");
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}
You’ve gone to a different page
Goalscompleted
0
- Set the frame background image
img/leafs-frame.png
for the portrait, - assign the value
180
for theborder-image-slice
property - then add
fill
toborder-image-slice
.
Comments