javascript - There is a line wrapping problem after implementing horizontal scrolling on the mobile terminal. Please give me some advice.
某草草
某草草 2017-06-12 09:25:32
0
1
563

As shown in the figure, there are two label contents that need to be displayed side by side. Now there is a need to set a sliding display effect if the second label content exceeds the width.

The original effect is like this. If there are many words, there will be two lines. I want to change it to one line and the excess part will be scrolled. This is how I wrote it.

But the effect is like this, it becomes two lines, but if display:inline is set, display:-webkit-box cannot be used. Please give me some advice on how to achieve my needs.

某草草
某草草

reply all(1)
習慣沉默

Set an outer parent box with a width of 100% for the subtitle. The height is the line height of one line of text.
The height of the subtitle is also the line height of one line. Set the attribute white-space: nowrap;overflow:scroll;
Then set the pseudo subtitle Element::-webkit-scrollbar { display:none } Hide scroll bar

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template