Advertisement
talas

menu overlay

May 26th, 2021 (edited)
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. <head>
  2.  
  3. <style>
  4. .container {
  5. position: relative;
  6. width: 100%;
  7. }
  8.  
  9. .image {
  10. opacity: 1;
  11. width: 100%;
  12. height: 10%;
  13. opacity: 1;
  14. transition: .5s ease;
  15. backface-visibility: hidden;
  16. border-width:7px;
  17. border-style:solid;
  18. border-image:url("https://media.discordapp.net/attachments/840568798465884200/846154914303967262/image_2021-05-24_013511.png") 8 fill round;
  19. }
  20.  
  21. .overlay {
  22.  
  23. position: absolute;
  24. bottom: 0;
  25. left: 0;
  26. right: 0;
  27. background-color: #fff;;
  28. overflow: hidden;
  29. width: 0;
  30. height: 100%;
  31. transition: .5s ease;
  32. opacity: 0.7;
  33.  
  34. }
  35.  
  36. .container:hover .overlay {
  37. width: 30%;
  38. color: #FED9E3;
  39.  
  40. }
  41. .container:hover .image {
  42. color: #fff;
  43. opacity: 0.5;
  44. }
  45.  
  46. .link {
  47. text-decoration:none;
  48. text-shadow: -1px 0 #000, 0 1px #000, 1px 0 #000, 0 -1px #000, 0 0;
  49. font-size:20px;
  50. font-weight:bold;
  51. position: absolute;
  52. top: 50%;
  53. color: #ffffff;
  54. left: 45%;
  55. -webkit-transform: translate(-50%, -50%);
  56. -ms-transform: translate(-50%, -50%);
  57. transform: translate(-50%, -50%);
  58. white-space: nowrap;
  59.  
  60. </style>
  61. </head>
  62. <body>
  63.  
  64. <div class="container">
  65. <img src="https://i.pinimg.com/564x/42/8d/d5/428dd557be8f0645bb804ce7ee9b99be.jpg" alt="Avatar" class="image">
  66. <div class="overlay">
  67. <div class="middle">
  68. <div class="link"><a href="#home">index</a><br>
  69. <a href="#one">about</a><br>
  70. <a href="#two">rules</a><br>
  71. <a href="#three">loves</a><br>
  72. </div>
  73. </div>
  74.  
  75. </body>
  76. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement