Articles on Trending Technologies

Technical articles with clear explanations and examples

How to bind an animation to a division element using CSS?

Asif Rahaman
Asif Rahaman
Updated on 15-Mar-2026 590 Views

Division elements () are commonly used for grouping HTML elements, and CSS allows us to bind animations to them for enhanced visual effects. This article demonstrates how to apply animations to division elements using CSS. Syntax selector { animation: animation-name duration timing-function delay iteration-count direction; } @keyframes animation-name { 0% { /* initial state */ } 100% { /* final state */ } } Method 1: Using @keyframes Animation The @keyframes method is the most commonly used approach to create animation ...

Read More

Hide the cursor on a webpage using CSS and JavaScript

Rushi Javiya
Rushi Javiya
Updated on 15-Mar-2026 7K+ Views

In this tutorial, we will learn to hide the cursor on a webpage using CSS and JavaScript. Sometimes, we need to create custom cursor styles or hide the cursor entirely for specific HTML elements to enhance user experience or create interactive interfaces. There are two main approaches to hide the cursor on a webpage. One uses CSS, and another uses JavaScript. We will explore both methods with practical examples. Syntax selector { cursor: none; } Method 1: Using CSS to Hide the Cursor The CSS cursor property allows us ...

Read More

a.sort, sorted(a), np_argsort(a) and np.lexsort(b, a) in Python

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

Python provides built-in sorting functions (sorted(), list.sort()) and NumPy provides advanced sorting (np.argsort(), np.lexsort()) for working with arrays and multiple sort keys. sorted() Returns a new sorted list without modifying the original ? a = [9, 5, 3, 1, 12, 6] b = sorted(a) print("Sorted Array:", b) print("Original Array:", a) Sorted Array: [1, 3, 5, 6, 9, 12] Original Array: [9, 5, 3, 1, 12, 6] list.sort() Sorts the list in-place (modifies the original, returns None). Faster than sorted() since it doesn't create a copy ? a = ...

Read More

How to change the color of an image to black and white using CSS?

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

To change the color of an image to black and white using CSS, you can apply CSS filter properties. This technique is useful for creating monochrome effects, hover states, or design themes without editing the original image files. Syntax selector { filter: grayscale(value); } Method 1: Using the Grayscale Filter The grayscale() filter is the most direct way to convert images to black and white. It accepts values from 0% (full color) to 100% (completely grayscale). Example In this example, we apply a 100% grayscale filter to convert ...

Read More

How to change the cases of text in paragraph using CSS?

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

The CSS text-transform property is used to control the capitalization of text in HTML elements. It provides an easy way to change text case without modifying the actual content in your HTML. Syntax selector { text-transform: value; } Possible Values ValueDescription capitalizeCapitalizes the first letter of each word uppercaseConverts all text to uppercase letters lowercaseConverts all text to lowercase letters noneNo transformation (default value) Example: Text Case Transformations The following example demonstrates all three text transformation values applied to different paragraphs − ...

Read More

How to change image on hover with CSS?

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

To change image on hover with CSS, we will be using the :hover pseudo-class. In this article, we have discussed two different approaches to change image on hover with CSS properties. We are having an image in our HTML document, our task is to change the image when we hover over the image. Syntax /* Using background property */ selector { background: url('image1.jpg'); } selector:hover { background: url('image2.jpg'); } /* Using content property */ selector { content: url('image1.jpg'); } selector:hover { ...

Read More

How to change the position of the scrollbar using CSS?

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

To change the position of the scrollbar using CSS, you can use various CSS properties like direction, transform, and overflow. By default, scrollbars appear on the right (vertical) and bottom (horizontal), but these positions can be modified. Syntax /* For left-side scrollbar */ selector { direction: rtl; } /* For rotated scrollbar positions */ selector { transform: rotate(180deg); } /* For overflow-based scrollbars */ selector { overflow-x: auto; /* horizontal scrollbar */ overflow-y: auto; /* vertical scrollbar */ } ...

Read More

How to change the color of selected text using CSS?

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

To change the color of selected text using CSS, you can use the ::selection pseudo-element. This feature allows you to customize the appearance of text when users select it with their mouse or keyboard. Syntax ::selection { color: value; background-color: value; } /* Or target specific elements */ element::selection { color: value; background-color: value; } Supported Properties The ::selection pseudo-element only supports a limited set of CSS properties − PropertyDescription colorText color of selected content ...

Read More

How to change the color of the radio button using CSS?

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

To change the color of the radio button using CSS, is a simple process that can be achieved using various approaches. Radio buttons allow users to select one option from multiple available choices, and customizing their appearance helps maintain design consistency across your website. Syntax /* Using accent-color property */ input[type="radio"] { accent-color: color; } /* Using hue-rotate filter */ input[type="radio"] { filter: hue-rotate(angle); } Method 1: Using accent-color Property The accent-color property is the modern and most straightforward way to change radio button colors. ...

Read More

Absolute and Relative Imports in Python

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

In Python, when you need to access code from another file or package, you use import statements. There are two approaches − absolute imports (full path from the project root) and relative imports (path relative to the current file). How Python Resolves Imports When Python encounters an import statement, it searches in this order − Module cache − Checks sys.modules for previously imported modules. Built-in modules − Searches Python's standard library. sys.path − Searches directories in sys.path (current directory first). If not found anywhere, raises ModuleNotFoundError. Import Order Convention Import statements should be ...

Read More
Showing 19911–19920 of 61,297 articles
Advertisements