- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Slicing Asymmetrical 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: 50px auto;
padding: 10px;
width: 270px;
height: 270px;
outline: 10px solid white;
border: 50px solid rgba(0, 0, 0, 0.4);
border-image-source: url("img/border-img.png");
border-image-slice: 50;
background: url("img/border-img-irregular.png") no-repeat #ffffff;
background-clip: padding-box;
background-origin: content-box;
}
You’ve gone to a different page
Goalscompleted
0
- Change the frame image to
img/border-img-irregular.png
for.portrait
, - and then change the image slicing for the frame to
50 50 65 40
. - and add the keyword
fill
.
Comments