Tag

text-overflow

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 23, 2024 · Frontend Development

Implementing Middle Ellipsis for Long Titles with JavaScript and CSS

This article explains how to truncate overly long title text by showing the start and end with an ellipsis in the middle, using JavaScript to measure element widths, calculate cut‑off indices, and dynamically construct the shortened string, while also covering CSS‑only alternatives.

CSSEllipsisJavaScript
0 likes · 12 min read
Implementing Middle Ellipsis for Long Titles with JavaScript and CSS
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 3, 2024 · Frontend Development

Common Front‑End Issues on iOS, Android, and Web: Border‑Radius, Text Overflow, Button Focus, Coupon Hole Effect, Clipboard Compatibility, UnoCSS, and CORS Options Requests

This article explains several practical front‑end problems—including iOS border‑radius loss with transforms, text‑overflow truncation on iOS, Android button focus outlines, CSS coupon hole effects, clipboard API compatibility, UnoCSS style loss after bundling, and CORS OPTIONS request failures on low‑end devices—along with clear code‑based solutions.

CORSCSSClipboard
0 likes · 6 min read
Common Front‑End Issues on iOS, Android, and Web: Border‑Radius, Text Overflow, Button Focus, Coupon Hole Effect, Clipboard Compatibility, UnoCSS, and CORS Options Requests