Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="a"></div>
- <div class="test">
- conteudo
- </div>
- * {
- margin: 0;
- padding: 0;
- box-sizing :border-box;
- }
- .a {
- background: red;
- height: 100px;
- width: 100px;
- }
- .test {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 100px;
- width: 100px;
- position: relative;
- }
- .test:before {
- content: '';
- height: 50%;
- width: 100%;
- display: block;
- z-index: -1;
- position: absolute;
- background: red;
- top: 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement