Advertisement
stqr-crossed

bookshelf template [css]

Mar 27th, 2025
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.68 KB | None | 0 0
  1. /*coded on an easy bake oven by kalachuchi.neocities*/
  2. /*NOTE: as much as possible don't touch the scrolling of elements, because it messes up the spacing and functionality*/
  3.  
  4. body {
  5. font-family: ms ui gothic;
  6. overflow-x: hidden;
  7. margin: 0;
  8. background: #d8d5db;
  9. color: #2d3142;
  10. overflow: hidden;
  11. }
  12.  
  13. :root {
  14. --border-1: 0.1rem solid #2d3142;
  15. --h1-bg: #b6cfe8;
  16. --nav-bg: #dceefe;
  17. --scrollbar-border: 0.05em solid #787b87;
  18. --scrollbar-bg-1: linear-gradient(
  19. 0deg,
  20. rgba(154, 175, 208, 1) 10%,
  21. rgba(236, 242, 249, 1) 57%,
  22. rgba(182, 207, 232, 1) 97%
  23. );
  24. --scrollbar-bg-2: rgba(154, 175, 208, 0.32);
  25. }
  26.  
  27. #main {
  28. position: absolute;
  29. margin: auto;
  30. top: 0;
  31. left: 0;
  32. right: 0;
  33. bottom: 0;
  34. background-color: #fff;
  35. border: var(--border-1);
  36. border-radius: 0.8em 0 0.8em 0;
  37. padding: 1em;
  38. width: fit-content;
  39. height: fit-content;
  40. box-shadow: 0 0 0.3rem 0.1em #6f757d;
  41. }
  42. #main h1{
  43. font-size: 2em;
  44. margin: 0.3em;
  45. }
  46. #main h4 /*footer credits! do not edit*/ {
  47. font-size: 0.8em;
  48. margin: 0.3em 0 0 0;
  49. text-align: center;
  50. }
  51. a{
  52. color: inherit;
  53. }
  54. a:hover{
  55. text-decoration: none;
  56. }
  57. a:active{
  58. color: #fff;
  59. }
  60.  
  61. #wrap {
  62. display: flex;
  63. justify-content: space-between;
  64. width: 65em;
  65. height: 35em;
  66. }
  67.  
  68. /*menu on the left*/
  69. #nav {
  70. width: 10em;
  71. background: var(--nav-bg);
  72. overflow: scroll;
  73. }
  74. #nav h2 {
  75. border-top: var(--border-1);
  76. border-bottom: var(--border-1);
  77. background-color: #fff;
  78. margin: 0;
  79. padding: 0.2em;
  80. font-size: 1em;
  81. font-style: italic;
  82. }
  83. #nav p {
  84. margin: 0;
  85. padding: 0.4em;
  86. }
  87. #nav::-webkit-scrollbar {
  88. display: none;
  89. }
  90.  
  91. /*all the books*/
  92. #bookshelf {
  93. width: 54em;
  94. background-color: #fff;
  95. border: var(--border-1);
  96. overflow: scroll;
  97. overflow-x: hidden;
  98. }
  99. .shelf-wrap {
  100. height: fit-content;
  101. }
  102. .shelf-wrap h2 {
  103. width: fit-content;
  104. height: fit-content;
  105. margin: 0.6em 0.6em 0 0.6em;
  106. font-size: 1.5em;
  107. color: #fff;
  108. text-shadow:
  109. -1px 0 #000,
  110. 0 1px #000,
  111. 1px 0 #000,
  112. 0 -1px #000;
  113. }
  114. .shelf {
  115. height: 14em;
  116. overflow-x: scroll;
  117. overflow-y: hidden;
  118. display: flex;
  119. flex-flow: column wrap;
  120. justify-content: flex-end;
  121. align-content: flex-start;
  122. }
  123. .book {
  124. border: var(--border-1);
  125. max-width: 8em;
  126. height: 12em;
  127. transition: max-width 400ms;
  128. display: flex;
  129. overflow: clip;
  130. background-color: #fff;
  131. margin: 0.4em;
  132. }
  133. .book .cover {
  134. border-right: var(--border-1);
  135. height: 12em;
  136. display: block;
  137. position: relative;
  138. }
  139. .cover img {
  140. height: 12em;
  141. width: 8em;
  142. object-fit: cover;
  143. object-position: center;
  144. filter: grayscale(80%) brightness(120%);
  145. transition: 0.4s all;
  146. }
  147. .cover img:hover,
  148. .cover:hover {
  149. filter: grayscale(0%);
  150. }
  151. .book .text {
  152. overflow: scroll;
  153. overflow-x: hidden;
  154. padding: 0.5em;
  155. }
  156. .text::-webkit-scrollbar {
  157. display: none;
  158. }
  159. .book:hover {
  160. max-width: 30rem;
  161. }
  162.  
  163. ::-webkit-scrollbar {
  164. width: 0.8em;
  165. height: 0.5em;
  166. }
  167. ::-webkit-scrollbar-thumb {
  168. box-shadow: inset 0 0 0.4em 0 #fff;
  169. border: var(--scrollbar-border);
  170. }
  171.  
  172. ::-webkit-scrollbar-track {
  173. background: var(--scrollbar-bg-1);
  174. border-left: var(--scrollbar-border);
  175. }
  176. ::-webkit-scrollbar-track:horizontal {
  177. background: var(--scrollbar-bg-2);
  178. border: none;
  179. border-top: var(--scrollbar-border);
  180. border-bottom: var(--scrollbar-border);
  181. }
  182.  
  183. #bookshelf::-webkit-scrollbar {
  184. width: 14px;
  185. height: 10px;
  186. }
  187.  
  188. #bookshelf::-webkit-scrollbar-thumb {
  189. background: linear-gradient(90deg, rgba(238,238,238,1) 38%, rgba(206,206,206,1) 62%);
  190. border: 1.5px solid #888888;
  191. border-radius: 5px;
  192. }
  193.  
  194. #bookshelf::-webkit-scrollbar-track {
  195. background: linear-gradient(90deg, rgba(230,230,230,1) 6%, rgba(240,240,240,1) 18%);
  196. }
  197.  
  198. #bookshelf::-webkit-scrollbar-button {
  199. display: block;
  200. width: 14px;
  201. height: 16px;
  202. }
  203.  
  204. #bookshelf::-webkit-scrollbar-button:vertical:start:decrement {
  205. background: white;
  206. background-image: url("https://dl.dropbox.com/s/vtnpkuealr2f7u4/whc8iy3_d.png");
  207. border: 1.5px solid #888888;
  208. border-radius: 5px;
  209. }
  210.  
  211. #bookshelf::-webkit-scrollbar-button:vertical:start:increment {
  212. display: none;
  213. }
  214.  
  215. #bookshelf::-webkit-scrollbar-button:vertical:end:decrement {
  216. display: none;
  217. }
  218.  
  219. #bookshelf::-webkit-scrollbar-button:vertical:end:increment {
  220. background: white;
  221. background-image: url("https://dl.dropbox.com/s/vtnpkuealr2f7u4/whc8iy3_d.png");
  222. border: 1.5px solid #888888;
  223. border-radius: 5px;
  224. }
  225.  
Tags: templates
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement