Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
338 views
in Technique[技术] by (71.8m points)

html - Positioning text with word-space on desktop and mobile device css

It works good on desktop devise, but i wanr for mobile make each sentence in a column. How can i make it with css? I dont want to use flex or another blocks.

.hero__subtitle {
    word-spacing: 5em;
  }
<p class="hero__subtitle">
               Some text for test. Another text for test.  Another text for test.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use media query for making different display for different devices . if you don't know about media query just search a little it just works with the given pixels. Or you can use js to split the given string to its words or its sentences and print even in different H1 tags. Or tags with custom classes. Depends on your imagination


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...