Arjun Thakur

Arjun Thakur

749 Articles Published

Articles by Arjun Thakur

Page 20 of 75

Difference between window.location.href, window.location.replace and window.location.assign in JavaScript?

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

The window object includes the location object in JavaScript, which provides three different methods for navigating between pages. Each method has distinct behavior regarding browser history and navigation. window.location.href The href property gets or sets the complete URL of the current page. When assigned a new value, it navigates to that URL and adds an entry to the browser's history stack. Example Click below to get the complete URL of the page. Get Current URL ...

Read More

How to set the bottom margin of an element?

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

The margin-bottom property sets the bottom margin of an element, creating space between the element and content below it. It accepts values in pixels, percentages, or auto. Syntax element.style.marginBottom = "value"; Parameters The margin-bottom property accepts the following values: Length: Pixels (px), em, rem, etc. Percentage: Relative to parent element's width auto: Browser calculates the margin automatically Example: Setting Bottom Margin with CSS .large-margin { ...

Read More

Set the distance between the marker and the text relating to that marker with CSS

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

The marker-offset property was a CSS property designed to control the distance between list markers and their associated text content. However, this property has been deprecated and is no longer supported in modern browsers. What was marker-offset? The marker-offset property was intended to set the spacing between the list marker (bullet, number, etc.) and the text content of list items. It accepted length values like pixels, ems, or centimeters. Syntax (Deprecated) marker-offset: | auto; Example (No Longer Works) This code demonstrates how marker-offset was supposed to work, but it will not ...

Read More

What is composition in HTML5 Canvas?

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

HTML5 Canvas composition refers to how new shapes are drawn in relation to existing content on the canvas. The globalCompositeOperation property controls how newly drawn shapes combine with existing pixels. What is globalCompositeOperation? The globalCompositeOperation property determines the blending mode for new shapes. It affects transparency, layering, and how colors mix when shapes overlap. Syntax context.globalCompositeOperation = "operation-type"; Common Composition Types There are 12 main composition operations that control how new shapes interact with existing canvas content: ...

Read More

How to inject JavaScript in WebBrowser control?

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

To inject JavaScript in WebBrowser control, you need to create a Windows Forms application and use the WebBrowser control's document manipulation capabilities. This allows you to dynamically add JavaScript code to web pages loaded in your application. Prerequisites Create a Windows Forms application in Visual Studio Drag a WebBrowser control to the form Set the Url property of the WebBrowser control Right-click the project, choose Add reference... → COM → Type Libraries Select "Microsoft HTML Object Library" ...

Read More

HTML5+CSS3 Framework like BluePrint/960gs?

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

When looking for HTML5+CSS3 frameworks similar to Blueprint or 960gs, you have several modern alternatives that provide responsive grid systems and enhanced styling capabilities. Available Framework Options Here are two notable frameworks that extend beyond traditional grid systems: 52framework Susy 52framework The 52framework (Official Site) is a comprehensive HTML5+CSS3 framework that provides: CSS3 gradients, multiple shadows, and other advanced visual properties CSS3 selectors with Internet Explorer compatibility Enhanced HTML5 video support ...

Read More

Perform basic HTML5 Canvas animation

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

HTML5 canvas provides the necessary methods to draw and manipulate graphics dynamically. Combined with JavaScript, we can create smooth animations by continuously redrawing the canvas content at regular intervals. How Canvas Animation Works Canvas animation involves three key steps: Clear the canvas - Remove previous frame content Draw new content - Render the updated animation frame Repeat - Use timers to create continuous motion Basic Rotating Image Animation Here's a complete example that rotates an image around the canvas center: ...

Read More

CSS only Animate - Draw Circle with border-radius and transparent background

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

CSS animations can create impressive visual effects, including drawing animated circles with transparent backgrounds. This technique uses border-radius and keyframe animations to create a smooth circle-drawing effect. Basic Circle Structure The animation uses multiple div elements to create the drawing effect. The main container holds two half-circles that rotate to simulate drawing: CSS Animation Styles The CSS creates the drawing effect using transforms, opacity changes, and border properties: body { ...

Read More

Drawing lines with continuously varying line width on HTML canvas

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

Drawing lines with continuously varying line width on HTML canvas creates smooth, dynamic visual effects. This technique uses quadratic curves and gradually increases the line width to create flowing, organic-looking lines. Understanding the Approach The technique involves generating a series of points along a curved path and drawing segments between them with incrementally increasing line widths. Each segment uses quadraticCurveTo() to create smooth curves rather than sharp angles. Complete Example Variable Line Width Canvas ...

Read More

Reset HTML input style for checkboxes to default in IE

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

Resetting HTML input styles for checkboxes to their default native appearance can be challenging in Internet Explorer. Some browsers don't allow complete style resets for form elements. The Problem When you apply global CSS styles to inputs, checkboxes may inherit unwanted styling that you cannot easily reset to their original native appearance. Method 1: Target Specific Input Types Style only the input types you want to modify, excluding checkboxes: input[type="text"], input[type="password"], input[type="email"], input[type="number"] { border: 2px solid green; padding: 5px; } Method 2: ...

Read More
Showing 191–200 of 749 articles
« Prev 1 18 19 20 21 22 75 Next »
Advertisements