marshallsmyth

positions css

Oct 29th, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.35 KB | None | 0 0
  1. <style>
  2.  
  3. @import url(https://fonts.googleapis.com/css?family=Kotta+One|Kalam|Philosopher|);
  4. ::-webkit-scrollbar-thumb:vertical { background:#def;border-radius:0px;box-shadow:0px 0px 0px 0px #000; }
  5. ::-webkit-scrollbar-thumb:horizontal { background:black; }
  6. ::-webkit-scrollbar { width:33px;height:7px;background:black;border-radius:0px; }
  7.  
  8.  body { overflow:auto; background:#a08; }
  9.  
  10.  .static { color:white; background:green; position:static; height:100px; font-size:44px; text-align:center; }
  11.  .static2 { color:white; background:darkgreen; position:static; height:100px; font-size:44px; margin-top:-44px; }
  12.  .relative { color:white; background:red; position:relative; height:100px; z-index:3; font-size:44px; top:11px; text-align:center; }
  13.  .absolute { color:white; background:blue; position:absolute; height:300px;width:800px; z-index:5; font-size:44px; top:33 0px; }
  14.  .sticky { color:black; background:yellow; position:sticky; height:150px; z-index:7; font-size:44px; text-align:center;  }
  15.  .fixed { color:black; background:aqua; position:fixed; height:500px; z-index:9; font-size:44px; top:0px;left:200px; text-align:center; }
  16.  
  17. </style>
  18.  
  19. <div class="static">static</div>
  20. <div class="static2">static 2</div>
  21. <div class="relative">relative</div>
  22. <div class="absolute"><p><br>absolute</div>
  23. <div class="sticky">sticky</div>
  24. <div class="fixed">fixed</div>
  25.  
  26.  
  27.  
Add Comment
Please, Sign In to add comment