GifproGifpro

Interactive Text-Balance Playground: CSS text-wrap: balance & pretty

CODE PREVIEW

エディタを読み込み中…
P

Prompt

Create an interactive playground to explore CSS text-wrap: balance and text-wrap: pretty. Include a heading with long text, a slider to change container width, a toggle between balance/pretty/auto, and a live preview showing how the line wrapping changes.

このインタラクティブプレイグラウンドでは、text-wrap: balancetext-wrap: prettytext-wrap: auto の違いをリアルタイムで体験できます。スライダーでコンテナ幅を調整すると、見出しの改行位置が変化します。balance は各行をなるべく均等にし、視覚的な調和を高めます。pretty は最終行を最適化してオーファンを防ぎます。auto はブラウザのデフォルト改行です。幅を変えながらトグルして、タイポグラフィに最適な設定を見つけてください。

Prompt Overview

This interactive playground lets you experience the difference between text-wrap: balance, text-wrap: pretty, and text-wrap: auto in real time. Adjust the container width with the slider to see how the heading's line breaks adapt. The balance value makes each line nearly equal length, improving visual harmony. Pretty optimizes the last line to avoid orphans. Auto lets the browser decide default wrapping. Resize and toggle to find the perfect setting for your typography.

Was this prompt helpful?

Comments

Comments appear after moderation

この記事が役に立ったら投げ銭で応援

Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済

開発者が選ぶ最強ツール集

運営者が毎日使っているツール・ガジェット 6選

見る
Homeヘルプ