Articles on Trending Technologies

Technical articles with clear explanations and examples

How to create Image Folding Effect using HTML and CSS?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 1K+ Views

The Image Folding Effect is a popular CSS technique that creates a visually appealing paper-folding animation on images. This effect divides an image into segments that skew when hovered, simulating the appearance of folded paper. It's achieved using CSS transforms and the :nth-child selector. Transform Property The CSS transform property applies 2D or 3D transformations to elements. It can move, rotate, scale, and skew elements without affecting the document flow. Syntax transform: function(value); Common transform functions: translate() − moves an element along the x and y axis. rotate() − rotates an ...

Read More

Add a row at top in pandas DataFrame

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 2K+ Views

Adding a row at the top of a Pandas DataFrame is a common operation when you need to insert headers, summary rows, or new data at the beginning. There are several methods to achieve this − using pd.concat(), loc[] with index manipulation, or iloc slicing. Create a Sample DataFrame import pandas as pd df = pd.DataFrame({ 'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35], 'City': ['Delhi', 'Mumbai', 'Pune'] }) print("Original DataFrame:") print(df) Original DataFrame: Name ...

Read More

How to select all children of an element except the last child using CSS?

Tarun Singh
Tarun Singh
Updated on 15-Mar-2026 13K+ Views

To select all children of an element except the last child using CSS we will be understanding two different approaches. Each approach will be using CSS pseudo-class selectors to perform the required task. In this article, we'll see how to select all children of an element except the last child in CSS with different approaches. We will be discussing each approach in detail with examples that will help you understand how they work. Syntax /* Method 1: Using :not() pseudo-class */ parent > *:not(:last-child) { /* styles */ } /* Method ...

Read More

How to select all child elements recursively using CSS?

Tarun Singh
Tarun Singh
Updated on 15-Mar-2026 13K+ Views

To select all child elements recursively using CSS, we use the universal selector (*) with a parent selector. This technique allows you to target all descendant elements, regardless of their nesting level. Syntax /* Select direct children only */ .parent > * { property: value; } /* Select all descendants recursively */ .parent * { property: value; } Example 1: Direct Child Elements Only This example selects only the direct children of the parent container using the child combinator (>) − ...

Read More

Absolute and Relative frequency in Pandas

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 941 Views

In statistics, frequency indicates how many times a value appears in a dataset. Absolute frequency is the raw count, while relative frequency is the proportion (count divided by total observations). Pandas provides built-in methods for calculating both. Absolute Frequency Using value_counts() The simplest way to count occurrences of each value ? import pandas as pd data = ["Chandigarh", "Hyderabad", "Pune", "Pune", "Chandigarh", "Pune"] df = pd.Series(data).value_counts() print(df) Pune 3 Chandigarh 2 Hyderabad 1 dtype: int64 ...

Read More

How to set indent the second line of paragraph using CSS?

Shabaz Alam
Shabaz Alam
Updated on 15-Mar-2026 3K+ Views

The CSS text-indent property is typically used to indent the first line of a paragraph. However, to create a hanging indent effect where the second and subsequent lines are indented instead of the first line, you need to combine negative text-indent with positive padding-left. Syntax selector { text-indent: negative-value; padding-left: positive-value; } How It Works To indent the second line of a paragraph, we use a two-step approach − Negative text-indent: Moves the first line to the left Positive padding-left: Moves the entire paragraph ...

Read More

How to set div width to fit content using CSS?

Shabaz Alam
Shabaz Alam
Updated on 15-Mar-2026 52K+ Views

To set div width to fit content using CSS is an important task for creating responsive designs and optimal space usage. By default, div elements take the full available width, but we can make them shrink to fit their content. Syntax div { width: max-content; /* or fit-content */ } /* Alternative approach */ div { display: inline-block; } Method 1: Using max-content Width Property The max-content value sets the width to the maximum intrinsic width of the content, allowing the div to expand ...

Read More

How to set color opacity with RGBA in CSS?

Shabaz Alam
Shabaz Alam
Updated on 15-Mar-2026 1K+ Views

The CSS RGBA color model allows developers to set color opacity directly within the color value. RGBA stands for Red, Green, Blue, and Alpha, where the alpha channel controls the transparency of the element. Syntax selector { color: rgba(red, green, blue, alpha); } Where: red, green, blue − Values from 0 to 255 representing color intensity alpha − Value from 0 to 1 representing opacity (0 = transparent, 1 = opaque) What is the RGBA Color Model? RGBA is an extension of the RGB color model with ...

Read More

How to set checkbox size in HTML/CSS?

Shabaz Alam
Shabaz Alam
Updated on 15-Mar-2026 7K+ Views

To set checkbox size in HTML/CSS, we can use several CSS properties to control the dimensions and scaling of checkboxes. By default, checkboxes have a small size that may not be suitable for all designs. Syntax input[type="checkbox"] { width: value; height: value; /* OR */ transform: scale(value); /* OR */ zoom: value; } Method 1: Using Width and Height Properties The most straightforward approach is to use the width and ...

Read More

How to set blur distance in CSS?

Shabaz Alam
Shabaz Alam
Updated on 15-Mar-2026 475 Views

CSS (Cascading Style Sheets) is a powerful tool for designing visual effects on websites. The blur effect is one of the many features in CSS, which is used to blur any element using the filter property with the blur() function. To create a soft, dreamy effect or to draw attention to a specific element on a page, we can use the blur effect. Syntax selector { filter: blur(distance); } The Concept of Blur Distance in CSS Before discussing the practical aspect of setting blur distance, it is important to understand ...

Read More
Showing 19841–19850 of 61,297 articles
Advertisements