Guest User

5 CSS things that will blow your mind for sure:

a guest
Jan 18th, 2024
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.04 KB | None | 0 0
  1. Pratham (@Prathkum on Twitter) posted on 7:26 PM Β· Jan 15, 2024
  2. JavaScript is powerful.
  3.  
  4. But sometimes you can do great things using CSS.
  5.  
  6. 5 CSS things that will blow your mind for sure:
  7.  
  8. 1. Text Portrait
  9.   p {
  10.     background: url("");
  11.     -webkit-background-clip: text;
  12.     background-attachment: fixed;
  13.     background-repeat: no-repeat;
  14.     -webkit-text-fill-color: rgba(255, 255, 255, 0);
  15.   }
  16.  
  17. 2. Image rendering
  18. The "image-rendering" CSS property tells the browser how the image should be zoomed-in or zoomed-out.
  19.  
  20.   img {
  21.     image-rendering: crips-edges;
  22.    }
  23.    
  24. 3. Image Carousel using two lines of CSS.
  25.   .container {
  26.     scroll-snap-type: x mandatory;
  27.   }
  28.  
  29.   .slides {
  30.     scroll-snapβ€”align: start;
  31.   }
  32.  
  33. 4. CSS Typewriter effect
  34.   .animation {
  35.     animation: typewriter 4s steps(character count) ls 1 normal both,
  36.     blinkCursor 500ms steps(character count) infinite normal;
  37.   }
  38.  
  39. 5. Custom cursor
  40. Using "cursor" property, you can change the mouse cursor.
  41.  
  42.   img {
  43.     cursor: ur1l("/path"), auto;
  44.   }
Tags: CSS web webdev
Advertisement
Add Comment
Please, Sign In to add comment