Web Development Articles

Page 636 of 801

Create rounded image with CSS

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 2K+ Views

Creating rounded images in CSS is achieved using the border-radius property. This property allows you to round the corners of any element, including images, making them appear circular or with softly rounded edges. This technique is commonly used for profile pictures, thumbnails, and decorative elements. Syntax img { border-radius: value; } Possible Values ValueDescription 50%Creates a perfect circle (most common for rounded images) lengthSpecific radius in px, em, rem, etc. %Percentage of the element's dimensions Example 1: Circular Image The following example creates a perfectly circular ...

Read More

How to select elements with an attribute value containing a specified word with CSS?

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 296 Views

The CSS [attribute~="value"] selector allows you to select elements where a specific attribute contains a particular word as part of a space-separated list of values. This is particularly useful when dealing with attributes like class, alt, or custom data attributes that may contain multiple words. Syntax [attribute~="word"] { property: value; } How It Works The ~= operator matches elements where the specified attribute contains the exact word as a complete, space-separated token. For example, if an element has alt="Online Tutorials Library", it will match [alt~="Tutorials"] but not [alt~="Tutorial"]. Example ...

Read More

CSS animation-direction property

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

The CSS animation-direction property is used to set whether an animation should be played forwards, backwards, or in alternate cycles. This property allows you to control the playback direction of keyframe animations. Syntax selector { animation-direction: value; } Possible Values ValueDescription normalAnimation plays forward (default) reverseAnimation plays backward alternateAnimation plays forward, then backward alternate-reverseAnimation plays backward, then forward Example: Reverse Animation The following example demonstrates the reverse value, which plays the animation backward − div { ...

Read More

Set top tooltip with CSS

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

To set a top tooltip with CSS, you position the tooltip above the element using the bottom property along with position: absolute. The tooltip appears above the trigger element when hovered. Syntax .tooltip .tooltip-text { position: absolute; bottom: 100%; visibility: hidden; } .tooltip:hover .tooltip-text { visibility: visible; } Example The following example creates a tooltip that appears at the top when you hover over the text − ...

Read More

Usage of CSS transition-timing-function property

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

The CSS transition-timing-function property controls the speed curve of a transition effect. It determines how the transition progresses over time, allowing you to create smooth, natural-looking animations or more dramatic effects. Syntax selector { transition-timing-function: value; } Possible Values ValueDescription linearConstant speed throughout the transition easeDefault. Slow start, fast middle, slow end ease-inSlow start, gradually speeds up ease-outFast start, gradually slows down ease-in-outSlow start and end, fast middle cubic-bezier()Custom timing function using cubic bezier curve Example: Comparing Timing Functions The following example demonstrates different timing functions ...

Read More

Set right tooltip with CSS

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

To create a right tooltip in CSS, you position the tooltip to appear on the right side of an element. The key is using the left property with a value of 100% to push the tooltip completely to the right of its parent element. Syntax .tooltip .tooltiptext { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); } Example The following example creates a tooltip that appears on the right side when you hover over the text − ...

Read More

How to position tooltips correctly with CSS

Nitya Raut
Nitya Raut
Updated on 15-Mar-2026 6K+ Views

CSS tooltip positioning allows you to control exactly where tooltips appear relative to their trigger elements. By using positioning properties like top, right, bottom, and left, you can create tooltips that display in any direction. Syntax .tooltip { position: relative; } .tooltip .tooltip-text { position: absolute; top: value; left: value; right: value; bottom: value; } Method 1: Right-Positioned Tooltip The following example positions the tooltip to the right of ...

Read More

Create tooltips with CSS

Jennifer Nicholas
Jennifer Nicholas
Updated on 15-Mar-2026 167 Views

A tooltip is a small popup that appears when a user hovers over an element, providing additional information or context. CSS tooltips are lightweight, accessible, and don't require JavaScript. Syntax .tooltip { position: relative; } .tooltip .tooltiptext { visibility: hidden; position: absolute; z-index: 1; } .tooltip:hover .tooltiptext { visibility: visible; } Example: Basic Tooltip The following example creates a simple tooltip that appears on hover − ...

Read More

Specify the speed curve of the animation with CSS

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

The CSS animation-timing-function property specifies the speed curve of an animation, controlling how the animation progresses over time. This property determines whether the animation starts slow and speeds up, starts fast and slows down, or maintains a constant speed. Syntax selector { animation-timing-function: value; } Possible Values ValueDescription easeDefault. Slow start, fast middle, slow end ease-inSlow start, then speeds up ease-outFast start, then slows down ease-in-outSlow start and end, fast middle linearConstant speed throughout Example The following example demonstrates different timing functions applied to animated boxes ...

Read More

Set a CSS style for the element when the animation is not playing

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

The CSS animation-fill-mode property controls how an element's styles are applied before and after an animation runs. This property determines which styles are applied when the animation is not playing. Syntax selector { animation-fill-mode: value; } Possible Values ValueDescription noneNo styles are applied before or after animation (default) forwardsKeeps the final keyframe styles after animation ends backwardsApplies the first keyframe styles before animation starts bothApplies both forwards and backwards fill modes Example: Using Backwards Fill Mode The following example demonstrates how animation-fill-mode: backwards applies the starting ...

Read More
Showing 6351–6360 of 8,010 articles
« Prev 1 634 635 636 637 638 801 Next »
Advertisements