SMF - Henüz Yeni Yüklendi!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body{
display: grid;
place-content: center;
height: 100vh;
}
div{
background-color: white;
width: 500px;
height: 500px;
margin-inline: auto;
outline: 1px solid pink;
display: flex;
justify-content: center;
align-items: center;
position: relative;
&::after{
background-color: red; /* adjust as needed */
content:''; /* needed for the element to render */
display: block;
margin-inline: auto;
position: absolute;
width: 100%;
height: 100%;
left: -20px;
top: -10px;
z-index: -1;
}
}
h1{
position: relative;
text-align: center;
padding-block-start: 50px;
padding-block-end: 50px;
margin: 0;
&::before{
background-color: red; /* adjust as needed */
content:''; /* needed for the element to render */
display: block;
margin-inline: auto;
position: absolute;
width: 80%; /* adjust as needed */
height: 2px; /* adjust as needed for rule thickness */
right: 0;
left: 0;
top: 0;
}
&::after{
background-color: red; /* adjust as needed */
content:''; /* needed for the element to render */
display: block;
margin-inline: auto;
position: absolute;
width: 80%; /* adjust as needed */
height: 2px; /* adjust as needed for rule thickness */
right: 0;
left: 0;
bottom: 0;
}
}
</style>
</head>
<body>
<div><h1>This is my headline</h1></div>
</body>
</html>