DEV Community

Cover image for 10 CSS tips you need to know right now.
Abhiraj Bhowmick
Abhiraj Bhowmick

Posted on • Edited on • Originally published at blog.abhiraj.co

53 11

10 CSS tips you need to know right now.

1. Change the color of the cursor for any input field

caret

2. Center any thing with just 3 lines of CSS

Imgur

3. Add smooth scroll in just one line of CSS

Imgur

4. Add any image to the heading of a page to create a cool effect

Imgur

5. Truncate text with plain CSS

Imgur

6. Make any element resizable

Imgur

7. Add any image as the cursor

Imgur

8. Animate Scroll Behaviour

Imgur

9. Enable Blend Mode

Imgur

10. Select content with CSS

Imgur


Thank you for reading

If you liked this post, subscribe to my newsletter to never miss out on my blogs, product launches and tech news.

Abhiraj's Dev-letter

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (6)

Collapse
 
mavuriel profile image
mavuriel

Knowledge is for everyone and time you take to share it is appreciated, but friend I saw these same 7 snippets in a Twitter thread, I don't want to say that anyone else can have that knowledge but I think at least you should give a little credit to the person who did it before.
https://twitter.com/denicmarko/status/1450768106872311809?t=1tb-pktzntK3RiC7PriWeA&s=19

Collapse
 
abhirajb profile image
Abhiraj Bhowmick • Edited

sure thing! I have done it.

Collapse
 
iakovosvo profile image
iakovosvo

The second one can also be done with 2 lines of CSS:

display: grid;
place-items: center;
Enter fullscreen mode Exit fullscreen mode
Collapse
 
luizc91 profile image
LuizC91

Neat

Collapse
 
harsvnc profile image
Hrn Svncハルン

2 always gets me googleing. Today I bookmared this thread, thanks man!

Collapse
 
mukhammadakilov profile image
Mukhammad Akilov

Nice 👍👍

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay