Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 17, 2021 07:07 pm GMT

5 Awesome CSS tricks every developer should know

CSS is Cascading Style Sheets and is used to describe how HTML elements should display. Its one of the first technology learned by soon to be front-end and web developers, and its an absolute have to know basic.

Although it seems CSS cant do a lot besides giving our HTML colors, positions, etc., but it can also let us create animations and bring some life to our apps and websites. Probably now many of us take care of mastering CSS and learning it so deeply, but its totally worth to know some useful tips and tricks which may help you to create stunning websites!

Are you ready to check out 5 tips and tricks which can change your CSS usage from now?

Lets start!

#1: Smooth scrolling

This technique is super important when you have a button that displays a different part of your web page. Doing it with a simplehref="#goToContact"will definitely move quickly but not sexy. Having a smooth scroll is super sexy and professional. Your web visitor deserves the best user experience.
Smooth Scrolling

#2: Resize images to fit

Who didnt have a headache making an image fit to a place on your web page? I have an easy way to handle this like a pro

Here is an example:
Resize IMG

#3: Setting an image as cursor

Want to make your cursor special like your web app or website? This can give a unique souvenir to your web visitor, so why not:
Cursor

#4: Center anything in 3 lines of code

Centering in CSS, who didnt end up pulling out his or her hair? Here 3 magical CSS line to center anything:
Center


#5: Set a limited content in a paragraph

Do you need to display only a few phrases in your paragraph? Again, CSS can do this in one line of code. The-webkit-line-clampCSS property allows limiting of contents of a block container to a specified number of lines.
limit

Next Blog Topic:

How to make Glassmorphism using HTML and CSS.



Do visit the community made by me and my friend@shreyazz for more amazing and informative stuff, and if you wanna recommend something or give feedback, feel free to comment!

CodeBox's handles : https://linktr.ee/CodeBox


Original Link: https://dev.to/sumeet16/5-awesome-css-tricks-every-developer-should-know-2n5k

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To