Tag

border

0 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
May 11, 2025 · Frontend Development

Understanding the Differences Between border: 0 and border: none in CSS

This article explains the semantic and practical differences between the CSS declarations border: 0 and border: none, covering their behavior, use‑cases, performance impact, compatibility with older browsers and assistive technologies, and provides code examples for each.

CSSCompatibilityWeb Development
0 likes · 8 min read
Understanding the Differences Between border: 0 and border: none in CSS
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 24, 2025 · Frontend Development

How to Smoothly Change Border Width on Hover Without Layout Shift

This article explains why increasing a card's border width on hover can cause layout jitter and presents three CSS techniques—transparent initial border, dynamic padding adjustment, and flex‑centered layout—to achieve a smooth transition without shifting inner content.

CSSborderflex layout
0 likes · 6 min read
How to Smoothly Change Border Width on Hover Without Layout Shift
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jul 25, 2024 · Frontend Development

Why a 0.5px Border Renders as 1px and How to Fix It

This article explains why CSS borders set to 0.5px often appear as 1px on various devices, discusses browser rendering and device pixel ratio issues, and provides five practical solutions—including pseudo‑elements, shadows, SVG, and container tricks—to achieve sub‑pixel borders in H5 layouts.

CSSWeb Developmentborder
0 likes · 6 min read
Why a 0.5px Border Renders as 1px and How to Fix It