CSS Articles

Page 81 of 130

Align flex items at the beginning of the container with CSS

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 210 Views

The CSS justify-content property with the flex-start value is used to align flex items at the beginning of the flex container along the main axis. This is the default behavior for flex containers, positioning items at the start of the container. Syntax .container { display: flex; justify-content: flex-start; } Example The following example demonstrates how to align flex items at the beginning of the container using justify-content: flex-start − .mycontainer { ...

Read More

Animate CSS border-spacing property

Samual Sam
Samual Sam
Updated on 15-Mar-2026 211 Views

The CSS border-spacing property controls the distance between the borders of adjacent table cells. When animated, it creates a dynamic effect where the spacing between cells changes smoothly over time. Syntax selector { border-spacing: value; animation: animation-name duration timing-function; } Example The following example animates the border-spacing property from 0px to 20px − table { border-collapse: separate; border-spacing: 0px; ...

Read More

Perform Animation on border-right-width property

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 138 Views

The CSS border-right-width property can be animated to create smooth transitions of the right border thickness. This creates engaging visual effects where the border grows or shrinks over time. Syntax selector { animation: animation-name duration timing-function iteration-count; } @keyframes animation-name { from { border-right-width: initial-value; } to { border-right-width: final-value; } } Example The following example demonstrates animating the border-right-width from 15px to 25px − .animated-border { ...

Read More

Usage of calc() CSS function

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 154 Views

The CSS calc() function allows you to perform mathematical calculations to determine CSS property values. It enables dynamic calculations using different units like pixels, percentages, em, rem, and viewport units. Syntax selector { property: calc(expression); } Possible Values OperatorDescriptionExample +Additioncalc(100px + 50px) -Subtractioncalc(100% - 20px) *Multiplicationcalc(50px * 2) /Divisioncalc(200px / 4) Example: Dynamic Width Calculation The following example creates a div that spans the full width minus 100px for margins − body { ...

Read More

Animate CSS border-left-color property

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 216 Views

The CSS border-left-color property can be animated to create smooth color transitions on the left border of an element. This animation effect is useful for creating interactive hover states, loading indicators, or visual emphasis. Syntax selector { border-left-color: color; animation: animation-name duration timing-function iteration-count; } @keyframes animation-name { from { border-left-color: initial-color; } to { border-left-color: final-color; } } Example The following example demonstrates how to animate the border-left-color property from yellow to lightblue − ...

Read More

Animate border-left property with CSS

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 490 Views

The CSS border-left property can be animated to create smooth transitions between different border styles, widths, and colors. This animation technique is useful for creating interactive hover effects or drawing attention to specific elements. Syntax @keyframes animationName { from { border-left: initial-value; } to { border-left: final-value; } } selector { animation: animationName duration timing-function iteration-count; } Example: Animating Border Left Width and Color The following example demonstrates how to animate the border-left property by changing its width and color − ...

Read More

Animate border-color property with CSS

Samual Sam
Samual Sam
Updated on 15-Mar-2026 914 Views

The CSS border-color property can be animated to create dynamic color transitions on element borders. This animation effect is useful for hover states, attention-grabbing elements, or interactive UI components. Syntax selector { animation: animation-name duration timing-function iteration-count; } @keyframes animation-name { percentage { border-color: color-value; } } Example: Basic Border Color Animation The following example animates the border color from gray to red and back − ...

Read More

Perform Animation on border-bottom-width CSS property

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 218 Views

The CSS border-bottom-width property can be animated to create dynamic visual effects. By using CSS animations, you can smoothly transition the bottom border width from one value to another over a specified duration. Syntax selector { border-bottom-width: value; animation: animation-name duration timing-function iteration-count; } @keyframes animation-name { from { border-bottom-width: initial-value; } to { border-bottom-width: final-value; } } Example The following example demonstrates how to animate the border-bottom-width property from 5px to 50px − ...

Read More

Perform Animation on the background-color property with CSS

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 187 Views

The CSS background-color property can be animated using CSS animations and keyframes to create smooth color transitions. This technique is commonly used to create hover effects, attention-grabbing elements, and interactive visual feedback. Syntax selector { background-color: initial-color; animation: animation-name duration timing-function iteration-count; } @keyframes animation-name { percentage { background-color: target-color; } } Example: Basic Background Color Animation The following example demonstrates a continuous background color animation that transitions from ...

Read More

Animated background with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 704 Views

CSS animated backgrounds allow you to create dynamic visual effects by changing background properties over time. The @keyframes rule defines the animation sequence, while the animation property applies it to elements. Syntax @keyframes animation-name { from { background: initial-state; } to { background: final-state; } } selector { animation: animation-name duration timing-function iteration-count; } Example: Color Transition Animation The following example demonstrates a smooth background color transition that cycles through different colors − ...

Read More
Showing 801–810 of 1,299 articles
« Prev 1 79 80 81 82 83 130 Next »
Advertisements