Front End Technology Articles

Page 537 of 652

Usage of transform-origin property with CSS

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

The CSS transform-origin property sets the point around which an element's transformation takes place. By default, transformations occur around the center of an element, but you can change this origin point to any position. Syntax selector { transform-origin: x-axis y-axis z-axis; } Possible Values ValueDescription x-axisHorizontal position: left, center, right, or percentage/length y-axisVertical position: top, center, bottom, or percentage/length z-axisZ-axis position for 3D transformations (length value) Example: Transform Origin with Rotation The following example demonstrates how transform-origin affects the rotation point of an element − ...

Read More

Display the overflowed content when hovering over the element with CSS

Nancy Den
Nancy Den
Updated on 15-Mar-2026 3K+ Views

The CSS overflow property controls what happens when content exceeds its container's boundaries. By combining overflow with the :hover pseudo-class, you can reveal hidden content when users hover over an element. Syntax selector { overflow: hidden; /* Hide overflowed content initially */ } selector:hover { overflow: visible; /* Show overflowed content on hover */ } Example: Displaying Hidden Text on Hover The following example demonstrates how to show overflowed text when hovering over a container − ...

Read More

Which CSS property is used to run Animation in Reverse Direction?

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

The CSS animation-direction property is used to run animation in reverse direction. This property controls whether an animation should play forwards, backwards, or alternate back and forth. Syntax selector { animation-direction: value; } Possible Values ValueDescription normalAnimation plays forward (default) reverseAnimation plays in reverse direction alternateAnimation plays forward, then backward alternate-reverseAnimation plays backward, then forward Example: Reverse Animation Direction The following example shows how to run an animation in reverse direction using the reverse value − ...

Read More

CSS padding-box Value

usharani
usharani
Updated on 15-Mar-2026 307 Views

The CSS background-origin property with the padding-box value positions the background image starting from the upper left corner of the padding area. This means the background extends through the padding but not into the border area. Syntax selector { background-origin: padding-box; } Possible Values ValueDescription padding-boxBackground starts from the padding edge (default value) border-boxBackground starts from the border edge content-boxBackground starts from the content edge Example: Comparing Background Origin Values The following example demonstrates the difference between padding-box, border-box, and content-box values − ...

Read More

Add a blur effect to the shadow with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 1K+ Views

The CSS box-shadow property allows you to add shadow effects around an element. When you specify a blur radius value, it creates a soft, blurred shadow instead of a sharp one. Syntax selector { box-shadow: offset-x offset-y blur-radius color; } Parameters ParameterDescription offset-xHorizontal shadow offset (required) offset-yVertical shadow offset (required) blur-radiusAmount of blur applied to shadow (optional) colorShadow color (optional) Example The following example demonstrates how to add a blur effect to a shadow − h2 ...

Read More

Selects all elements with a lang attribute value starting with "en" with CSS

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

The CSS [attribute|="value"] selector is used to select elements with a specified attribute value that starts with the given value. This selector is particularly useful for language codes, where you want to select elements with lang attributes starting with "en" (like "en", "en-US", "en-GB", etc.). Syntax [attribute|="value"] { /* CSS properties */ } Example The following example selects all elements with a lang attribute value starting with "en" and applies an orange border ? ...

Read More

How to create fading effect with CSS

radhakrishna
radhakrishna
Updated on 15-Mar-2026 443 Views

To create a fading effect with CSS, you can use various techniques including CSS gradients, opacity transitions, and animations. The most common approach is using linear gradients with rgba colors to achieve smooth fading transitions. Syntax selector { background: linear-gradient(direction, color-stop1, color-stop2); /* OR */ opacity: value; transition: opacity duration; } Method 1: Using Linear Gradient The following example creates a horizontal fading effect using a linear gradient from transparent to opaque − ...

Read More

Add a background color to the form input with CSS

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 8K+ Views

The CSS background-color property is used to add background color to form input elements. This property allows you to customize the appearance of input fields by setting their background to any color value. Syntax input { background-color: value; } Possible Values ValueDescription color namePredefined color names like red, blue, gray hex codeHexadecimal values like #FF5733, #000000 RGBRGB values like rgb(255, 87, 51) transparentMakes the background transparent Example The following example applies a gray background color to text input fields − ...

Read More

Style select options with CSS

Nishtha Thakur
Nishtha Thakur
Updated on 15-Mar-2026 2K+ Views

The CSS select element can be styled to enhance its appearance and user experience. You can modify properties like width, padding, borders, background colors, and more to customize the dropdown menu. Syntax select { property: value; } Example: Styling Select Element The following example demonstrates how to style a select dropdown with custom padding, borders, and background color − select { width: 100%; padding: ...

Read More

Set Bordered Form Inputs with CSS

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

The CSS border property is used to add borders to form input elements. You can customize the border width, style, and color to create visually appealing forms. Syntax input { border: width style color; } Possible Values PropertyValuesDescription border-widthpx, em, thin, medium, thickSets the border thickness border-stylesolid, dashed, dotted, inset, outsetDefines the border appearance border-colorcolor names, hex, rgbSpecifies the border color Example: Inset Border for Text Inputs The following example creates bordered text inputs with an inset style − ...

Read More
Showing 5361–5370 of 6,519 articles
« Prev 1 535 536 537 538 539 652 Next »
Advertisements