ityizhuo

scrollbox with image or gif as background

Sep 27th, 2021
960
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--- scrollbox with image/gif background made by itzhuo don't need to credit me if you use :3 but pls don't post in another pastebin thanksss --->
  2.  
  3. <style>
  4. #scroll {
  5.     width: 50%;
  6.     padding: 8px;
  7.     background-image: url("https://i.pinimg.com/564x/53/0d/ae/530daed5aade6cd57cabb7b2bd3fc37a.jpg"); /* url of the img */
  8.    background-color: #FFFFFF; /* if the img is unavailable */
  9.    height: 100px; /* you need to set a specified height */
  10.    background-position: center; /* to center the image */
  11.    background-repeat: no-repeat; /* do not repeat the image */
  12.    background-size: cover; /* to resize the background image to cover the entire container */
  13.     font-size: 16px;
  14.     font-family: Times;
  15.     border-radius: 0.75em;
  16.     border: 4px solid #A9D0F5;
  17.     box-shadow: 0 0 0 1px black, inset 0 0 0 1px black, 0px 0px 8px 0px #000;
  18.     overflow: auto;
  19.   }
  20.  
  21. </style>
  22. <div id="scroll">
  23. <p></p>
  24. 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 text text text text text text text text text
  25. </div>
  26.  
  27.  
  28.  
RAW Paste Data