powys

flip card with scrollbox

Jun 22nd, 2021
1,689
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <link rel="preconnect" href="https://fonts.gstatic.com">
  5. <link href="https://fonts.googleapis.com/css2?family=Balsamiq+Sans&display=swap" rel="stylesheet">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <style>
  8.  
  9. body {
  10. position: relative;
  11. width: 100%;
  12. }
  13. .links {
  14. text-shadow: -1px 0 #fff, 0 1px #fff, 1px 0 #fff, 0 -1px #fff, 0 0;
  15. font-size:170%;
  16. font-weight:bold;
  17. color: #000;
  18. font-family: 'Balsamiq Sans', cursive;
  19. text-decoration:none;
  20.  
  21. }
  22. .flip-card {
  23. background-color: transparent;
  24. width: 400px;
  25. height: 450px;
  26. perspective: 1000px;
  27. border-radius:9px;
  28.  
  29. }
  30.  
  31. .flip-card-inner {
  32. position: relative;
  33. width: 100%;
  34. height: 100%;
  35. text-align: center;
  36. transition: transform 0.6s;
  37. transform-style: preserve-3d;
  38. box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
  39. border: #000 double;
  40. border-radius:9px;
  41. }
  42.  
  43. .flip-card:hover .flip-card-inner {
  44. transform: rotateY(180deg);
  45. }
  46.  
  47. .flip-card-front, .flip-card-back {
  48. position: absolute;
  49. width: 100%;
  50. height: 100%;
  51. -webkit-backface-visibility: hidden;
  52. backface-visibility: hidden;
  53. border-radius:9px;
  54. }
  55.  
  56. .flip-card-front {
  57. background-color: #bbb;
  58. color: black;
  59. }
  60.  
  61. .flip-card-back {
  62. background-color: #000;
  63.  
  64. color: white;
  65. transform: rotateY(180deg);
  66. border-radius:6px;
  67. }
  68.  
  69. #textsa {
  70.  
  71.  
  72. overflow: scroll;
  73. height: 400px;
  74. width: 95%;
  75. padding: 10px;
  76. text-shadow: -1px 0 #fff, 0 1px #fff, 1px 0 #fff, 0 -1px #fff, 0 0;
  77. font-size:170%;
  78. font-weight:bold;
  79. color: #000;
  80. font-family: 'Balsamiq Sans', cursive;
  81.  
  82. }
  83. </style>
  84. </head>
  85. <body>
  86. <div class="flip-card">
  87. <div class="flip-card-inner">
  88. <div class="flip-card-front">
  89. <img src="https://pbs.twimg.com/media/E0T9fO9VkAQ1LNx?format=jpg&name=large" alt="Avatar" style="width:100%;height:100%;border-radius:6px;">
  90. </div>
  91. <div class="flip-card-back">
  92.  
  93.  
  94. <div id="textsa">
  95.  
  96. <div align="left">
  97. text text text text text text text ss text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
  98.  
  99. </div>
  100. </div>
  101.  
  102.  
  103. </div>
  104. </div>
  105. </div>
  106.  
  107. </body>
  108. </html>
  109. <p>play around with the "flip-card" part for the width and height of the card!</p>
Advertisement
Add Comment
Please, Sign In to add comment