Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Articles by Arjun Thakur
Page 20 of 75
Difference between window.location.href, window.location.replace and window.location.assign in JavaScript?
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 MoreHow to set the bottom margin of an element?
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 MoreSet the distance between the marker and the text relating to that marker with CSS
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 MoreWhat is composition in HTML5 Canvas?
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 MoreHow to inject JavaScript in WebBrowser control?
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 MoreHTML5+CSS3 Framework like BluePrint/960gs?
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 MorePerform basic HTML5 Canvas animation
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 MoreCSS only Animate - Draw Circle with border-radius and transparent background
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 MoreDrawing lines with continuously varying line width on HTML canvas
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 MoreReset HTML input style for checkboxes to default in IE
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