私は約100語を含む段落を持っています。私は最大の単語数を1行につき10
に制限したいと思います。 CSSでwidthプロパティを使用しましたが、フォントサイズが小さくなると制限を超えます。 1行あたりの単語数を制限するにはどうすればよいですか?どんな助けもありがとう。html段落の1行あたりの単語数を制限するにはどうすればよいですか?
<p>The key takeaway for understanding the shift towards VR & AR is their collective push towards enabling people to engage more naturally with computers — by simply looking, gesturing, conversing, and being — as opposed to dealing with interfering and unnatural interfaces like mice, keyboards, and flat screens. Less interference means more immersion. And more immersion means more humanity, empathy, and potential for transformation in our experience — both relating to computers, and to each-other.</p>
出力はライン当たりわずか10単語を含むHTML段落でなければならない:
例このアプローチで
The key takeaway for understanding the shift towards VR & AR is their collective push towards enabling people to engage more naturally with computers — by simply looking, gesturing, conversing, and being — as opposed to dealing with interfering and unnatural interfaces like mice, keyboards, and flat screens. Less interference means more immersion. And more immersion means more humanity, empathy, and potential for transformation in our experience — both relating to computers, and to each-other.
10単語ごとに「\ n」を追加しようとしましたか? – dloeda
なぜ文字列を部分文字列に変換してから、\ nを追加してドローダが言ったのでしょうか? – EnriqueDev
助けてくれてありがとう – Dark