Article

7 Best Advanced CSS Tricks That Saves Your Time

Written by Solace Infotech

Topic: ProductivityPublished July 30, 2020
No ratings yet673 viewsSign in to rate
As time passes by, CSS is turning out to be more powerful and these days it offers bunches of conceivable outcomes to make visually stunning websites. Do you know all the features of CSS technology? There is a large pool of hidden tricks in the CSS technology. Learning those tricks will help you to compete with the modern development industry. Here are some of the important CSS tricks that you must know. Advanced CSS Tricks To Know In 2020-rn1. Vertically Align With Flexbox-rnAligning the text or element at the center has always been a complicated task for most of the developers. As per the CSS3 specification, using display: flex property/value eases the way to vertically align any element. Consider the following HTML:
I am vertically centered!
And the related CSS: .align-vertically { background: #13b5ea; color: #fff; display: flex; align-items: center; height: 200px; }rndisplay: flex specifies a Flexbox layout for element and align-items: center manages the vertical centering. 2. Hover effect-rnThis effect is used for icons, buttons, text links, block sections of site and so on. Whenever you have to change colors when someone hovers mouse through it, use the same CSS, but add :hover to it and change styling. Here’s an example: .entry h2{rnfont-size:36px;rncolor:#000;rnfont-weight:800; } .entry h2:hover{ color:#f00; }rnIt changes the color of h2 tag from black to red when someone hovers through it. Best thing about using :hover is- if font size and weight is not changing then, you will not need to declare font-size or weight again. It will change only the specified thing. 3. Curve Text Around a Floating Image-rnThe CSS property Shape-outside allows geometric shapes to set so as to define an area for text to flow around. .shape {rnwidth: 300px;rnfloat: left;rnshape-outside: circle(50%); }rn4. Gradients and Gradient Text-rnPrior to CSS3, a web designer or web developer could create a gradient background with creating and image photoshop and then display it on a website using background-image property. But since CSS specification, web designer or web developer can create gradients in HTML/CSS which results in fast load time and better user experience. Use the following CSS to create a gradient- body{rnbackground: linear-gradient(to right,#000,#0575e6);rntext-align: center; }rnA function linear-gradient() creates a linear gradient and sets it as the background image for the body. Function takes 3 arguments- a direction or an angle and 2 color stops. It is possible to apply the gradient to a text by using CSS gradients and WebKit specific properties, h1{ font-family: Arial; font-size: 50px; background: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#333)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }rn5. CSS Animations-rnKnow more at - https://solaceinfotech.com/blog/7-best-advanced-css-tricks-that-saves-your-time/

Article author

About the Author

Solace infotech

Further reading

Further Reading

3 total

Article

Introduction The solar industry is often described as a field full of opportunity. Demand grows as energy prices shift and environmental awareness increases. Many companies enter the market with strong technical knowledge and passionate teams. Yet growth does not always follow enthusiasm. A common and quiet challenge exists behind the scenes. Companies invest heavily in marketing, hire talented installers, and build impressive product lines, but still struggle to maintain con

February 9, 2026

Article

A reliable and versatile card printer is indispensable in today's fast-paced business environment. Card printers are integral for creating identification cards, payment cards, access passes, and membership cards. Thanks to their ability to customise and produce cards on demand, these devices have become increasingly popular across industries, including healthcare, retail, transportation, and education. This blog explores the types of cards a card printer can handle, emphasisi

December 8, 2024

Article

One of the most critical factors in ensuring stable and high-quality production for injection moulding is controlling mould temperature. This is where mould temperature controllers come into play. Specifically, the cooling process is just as necessary as the heating process in optimizing the efficiency and output of an injection moulding system. Calculating mould temperature controller cooling is critical to maximizing performance and preventing defects such as warping, uneve

December 8, 2024