Front End Scripts Articles

Page 20 of 47

Usage of border-width property in CSS

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

The border-width property sets the thickness of an element's border, not the color. It defines how wide the border should be around an element. Syntax border-width: value; Values The border-width property accepts the following values: Length values: px, em, rem, etc. (e.g., 2px, 1em) Keywords: thin, medium, thick Multiple values: Define different widths for each side Example: Basic Border Width .border-example { ...

Read More

Configuring any CDN to deliver only one file no matter what URL has been requested

Nitya Raut
Nitya Raut
Updated on 15-Mar-2026 210 Views

Content Delivery Networks (CDNs) are typically designed to serve static files based on specific URL paths. However, there are scenarios where you need a CDN to deliver the same file regardless of the requested URL - commonly used for Single Page Applications (SPAs) that rely on client-side routing. Why Serve One File for All URLs? Single Page Applications like React, Vue, or Angular apps use client-side routing. When users navigate to different URLs, the same index.html file should be served, and JavaScript handles the routing internally. Method 1: Using CloudFlare Page Rules CloudFlare allows you to ...

Read More

Usage of border-bottom-color property in CSS

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

The border-bottom-color CSS property sets the color of an element's bottom border. It only affects the color when a border style is already defined. Syntax border-bottom-color: color | transparent | inherit; Parameters The property accepts these values: color - Any valid CSS color value (hex, RGB, named colors) transparent - Makes the border invisible inherit - Inherits the color from parent element Example: Basic Usage ...

Read More

How to draw sine waves with HTML5 SVG?

Anvi Jain
Anvi Jain
Updated on 15-Mar-2026 1K+ Views

To draw sine waves with HTML5 SVG, you can use the element with cubic Bezier curves to closely approximate the smooth curves of a sine wave. This approach provides precise control over wave shape and amplitude. Basic Sine Wave Example Here's how to create a simple sine wave using SVG path with cubic Bezier approximation: SVG Sine Waves HTML5 SVG Sine Wave ...

Read More

Usage of margin-top property with CSS

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

The margin-top property specifies the top margin of an element in CSS. It creates space above an element, pushing it away from adjacent elements or the container's edge. Syntax margin-top: value; Values Length: Fixed values like 10px, 2em, 1rem Percentage: Relative to parent's width (e.g., 10%) auto: Browser calculates automatically inherit: Inherits from parent element Example: Fixed Values ...

Read More

Align HTML5 SVG to the center of the screen

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

SVG stands for Scalable Vector Graphics and it is a language for describing 2D-graphics and graphical applications in XML. HTML5 provides native SVG support, and centering SVG elements on a webpage requires specific CSS techniques. Method 1: Using Auto Margins and Display Block The simplest way to center an SVG horizontally is using auto margins with display block: #svgelem { margin-left: auto; ...

Read More

Usage of border-bottom-style property in CSS

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

The border-bottom-style property defines the style of an element's bottom border. It accepts various values like solid, dashed, dotted, and more to create different visual effects. Syntax border-bottom-style: value; Available Values The property accepts the following values: none - No border (default) solid - A solid line dashed - A dashed line dotted - A dotted line double - Two solid lines groove - A 3D grooved border ridge - A 3D ridged border inset - A 3D inset border outset - A 3D outset border Example: Basic Usage ...

Read More

How to rotate an image with the canvas HTML5 element from the bottom center angle?

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 370 Views

Rotating an image from the bottom center in HTML5 Canvas requires translating the canvas origin to the rotation point, applying the rotation, then drawing the image at an offset position. Understanding Canvas Rotation Canvas rotation always occurs around the origin (0, 0). To rotate from a specific point like bottom center, we must: Translate the canvas to the rotation point Apply the rotation Draw the image at an adjusted position Complete Example const canvas = document.getElementById('myCanvas'); const context = canvas.getContext('2d'); // Create an image const img = new ...

Read More

Usage of border-top-style property in CSS

Samual Sam
Samual Sam
Updated on 15-Mar-2026 174 Views

The border-top-style property changes the style of the top border of an element. This CSS property allows you to define different visual styles for the top border, such as solid, dashed, dotted, and more. Syntax border-top-style: value; Available Values The border-top-style property accepts the following values: none - No border (default) solid - A solid line dashed - A dashed line dotted - A dotted line double - Two solid lines groove - A 3D grooved border ridge - A 3D ridged border inset - A 3D inset border outset - A ...

Read More

Translating HTML5 canvas

Nishtha Thakur
Nishtha Thakur
Updated on 15-Mar-2026 479 Views

Use the translate() method to move the HTML5 canvas coordinate system. The translate(x, y) method shifts the canvas origin to a different point in the grid. The x parameter moves the canvas left (negative) or right (positive), and y moves it up (negative) or down (positive). Syntax context.translate(x, y); Parameters Parameter Description x Horizontal distance to ...

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