Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!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: flex;
- justify-content: center;
- align-items: center;
- height: 100vh;
- }
- .box {
- width: 300px;
- height: 200px;
- border: 1px solid black;
- position: relative;
- z-index: 1;
- }
- .box::before {
- content: '';
- display: block;
- width: 100px;
- height: 100px;
- position: absolute;
- left: 50%;
- right: 50%;
- top: -51px;
- transform: translateX(-50%) rotate(45deg);
- border: 1px solid black;
- background-color: cornflowerblue;
- z-index: 2;
- }
- </style>
- </head>
- <body>
- <div class="box">
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement