HTML _CSS
Postage Stamp Cutout
HiroDaegu
2022. 11. 22. 11:42
728x90
SMALL
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>POSTAGE STAMP CUTOUT EFFECTS</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="box"></div>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--clr: #4FB6FF;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: var(--clr);
}
.box {
position: relative;
width: 400px;
height: 320px;
background: #FFF radial-gradient(
var(--clr) 0px,
var(--clr) 7px,
transparent 0px
);
background-size: 20px 20px;
background-position: -10px;
}
.box::before {
content: '';
position: absolute;
inset: 20px;
background-image: url("img.jpg");
background-size: cover;
background-position: center;
box-shadow: 0 0 0 10px #FFF;
}
728x90
LIST