Advertisement
RandomGuy32

Flag Header (CSS)

Apr 2nd, 2021
869
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.03 KB | None | 0 0
  1. header {
  2.     position: relative;
  3.     top: 0;
  4.     left: 0;
  5.    
  6.     font-size: 64px;
  7.     height: 1em;
  8.     background-color: var(--yellow);
  9.    
  10.     --yellow: #FFD700;
  11.     --purple: #950DC2;
  12.    
  13.     --crescent-size: 0.6666666666em;
  14.     --crescent-void-size: 0.6em;
  15.    
  16.     --crescent-position: calc(50% - (var(--crescent-size) / 2));
  17. }
  18.  
  19. header span {
  20.     position: absolute;
  21.     display: block;
  22. }
  23.  
  24. header .ellipse {
  25.     border-radius: 100%;
  26. }
  27.  
  28. header .crescent {
  29.     background-color: black;
  30.     width: var(--crescent-size);
  31.     height: var(--crescent-size);
  32.     left: var(--crescent-position);
  33.     bottom: var(--crescent-position);
  34.     z-index: 1;
  35.    
  36.     transform: rotate(-45deg);
  37. }
  38.  
  39. header .crescent-void {
  40.     background-color: var(--yellow);
  41.     width: var(--crescent-void-size);
  42.     height: var(--crescent-void-size);
  43.     left: 0.2em;
  44.     bottom: calc(50% - var(--crescent-void-size) / 2);
  45.     z-index: 2;
  46. }
  47.  
  48. header .stripe {
  49.     background-color: var(--purple);
  50.     width: 100%;
  51.     height: 0.1em;
  52.     left: 0;
  53.     z-index: 3;
  54. }
  55.  
  56. header .stripe.top {
  57.     top: 0;
  58. }
  59.  
  60. header .stripe.bottom {
  61.     bottom: 0;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement