Web Development Articles

Page 640 of 801

CSS Transition property

Krantik Chavan
Krantik Chavan
Updated on 15-Mar-2026 235 Views

The CSS transition property allows you to create smooth animations when CSS properties change. It combines all four transition-related properties (transition-property, transition-duration, transition-timing-function, and transition-delay) into a single shorthand declaration. Syntax selector { transition: property duration timing-function delay; } Possible Values PropertyDescriptionDefault propertyCSS property to animate (or 'all')all durationAnimation duration (s or ms)0s timing-functionSpeed curve (ease, linear, ease-in, etc.)ease delayDelay before animation starts0s Example: Basic Height Transition The following example creates a smooth height transition when hovering over a box − ...

Read More

CSS animation-duration property

Nishtha Thakur
Nishtha Thakur
Updated on 15-Mar-2026 121 Views

The CSS animation-duration property specifies how long an animation should take to complete one full cycle. This property controls the speed of your animations by setting the time duration. Syntax selector { animation-duration: time; } Possible Values ValueDescription timeSpecifies the duration in seconds (s) or milliseconds (ms) 0sDefault value. No animation occurs Example: 2-Second Animation Duration The following example creates a moving and color-changing animation that completes in 2 seconds − div { ...

Read More

Add CSS transition effect for both the width and height property

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

To add transition effects for both the width and height properties of an element, you can use the CSS transition property. This creates smooth animations when these properties change, such as on hover or focus states. Syntax selector { transition: width duration, height duration; /* or */ transition: width duration, height duration, ease-function, delay; } Example: Transitioning Width and Height on Hover The following example demonstrates how to add transition effects for both width and height properties when hovering over a box ...

Read More

How to create a transition effect with CSS?

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

CSS transitions allow you to smoothly animate changes in CSS properties over a specified duration. They create smooth visual effects when elements change state, such as on hover or focus. Syntax selector { transition: property duration timing-function delay; } Possible Values PropertyDescription propertyCSS property to animate (width, height, color, etc.) durationTime the transition takes (in seconds or milliseconds) timing-functionSpeed curve (ease, linear, ease-in-out, etc.) delayDelay before transition starts (optional) Example: Width Transition on Hover The following example creates a smooth width transition when hovering over a ...

Read More

Build a radial gradient with the shape of a circle

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

The CSS radial-gradient property allows you to create circular gradient effects by specifying the circle shape parameter. This creates a gradient that radiates outward from a central point in a perfect circular pattern. Syntax selector { background: radial-gradient(circle, color1, color2, color3, ...); } Example: Circle-Shaped Radial Gradient The following example creates a circular radial gradient with multiple colors − #demo { height: 300px; width: ...

Read More

How to work with CSS Transitions?

Giri Raju
Giri Raju
Updated on 15-Mar-2026 119 Views

CSS transitions allow you to change property values smoothly over a specified duration, creating smooth animations between different states. This provides a better user experience by making changes appear gradual rather than instant. Syntax selector { transition: property duration timing-function delay; } Transition Properties PropertyDescriptionDefault Value transition-propertySpecifies which CSS property to transitionall transition-durationDefines how long the transition takes0s transition-timing-functionSpecifies the speed curve of transitionease transition-delayDefines when the transition will start0s Example: Basic Width Transition The following example demonstrates a smooth width transition on hover − ...

Read More

What are CSS Transitions?

varun
varun
Updated on 15-Mar-2026 207 Views

CSS transitions allow you to smoothly animate changes to CSS properties over a specified duration. Instead of property changes happening instantly, transitions create a gradual change effect that enhances user experience. Syntax selector { transition: property duration timing-function delay; } Transition Properties PropertyDescriptionExample Value transition-propertySpecifies which CSS property to animatewidth, height, all transition-durationSets how long the transition takes2s, 500ms transition-timing-functionControls the speed curveease, linear transition-delayDelays the start of transition1s, 200ms Example: Height Transition The following example demonstrates a smooth height transition when hovering over an element ...

Read More

CSS backface-visibility Property

George John
George John
Updated on 15-Mar-2026 113 Views

The CSS backface-visibility property determines whether an element should be visible when it is rotated away from the user and its back face is showing. This property is particularly useful in 3D transformations and animations. Syntax selector { backface-visibility: visible | hidden; } Possible Values ValueDescription visibleThe back face is visible when turned towards the user (default) hiddenThe back face is hidden when turned towards the user Example 1: Visible Backface The following example shows an element with backface-visibility set to visible − ...

Read More

How to select elements with a specified attribute and value with CSS

Nitya Raut
Nitya Raut
Updated on 15-Mar-2026 306 Views

The CSS [attribute="value"] selector is used to select elements that have a specific attribute with an exact matching value. This attribute selector is particularly useful for targeting elements based on their HTML attributes like rel, type, class, or custom data attributes. Syntax element[attribute="value"] { /* CSS properties */ } Example: Selecting Links with Specific rel Attribute The following example demonstrates how to select and style anchor elements that have a rel attribute with the value "nofollow" − ...

Read More

How to select elements with a specified attribute with CSS

Giri Raju
Giri Raju
Updated on 15-Mar-2026 259 Views

CSS attribute selectors allow you to target HTML elements that contain a specific attribute, regardless of the attribute's value. The [attribute] selector is used to select all elements that have the specified attribute present. Syntax [attribute] { /* styles */ } Example: Selecting Images with Alt Attribute The following example applies an orange border to all elements that have an alt attribute − img[alt] { border: 3px solid orange; ...

Read More
Showing 6391–6400 of 8,010 articles
« Prev 1 638 639 640 641 642 801 Next »
Advertisements