Create a div inside a div, outside There is a button in the layer div. Click it to expand/retract the content of the inner layer div. The original effect is: if the inner layer div is set to a certain size, if it can display 4 lines of content test1~4, a scroll bar will appear if there is still content. .
The current problem is that if you add the first sentence , the scroll bar will not appear in the vertical direction of the inner div, but it will not affect the horizontal direction. If there is too much content, it will You can’t view it when you go to the bottom of the page.
If you log out the first sentence , the scroll bar can appear in the inner div, but when you click to shrink, the content of the inner div shrinks but the border remains
Please tell me how to modify the combination of the two situations of solid line, that is, click the button to pull down the solid line, and then the scroll bar will appear, click the button again and the div will pull up as a whole, thank you
Reply to discussion (solution)
Expand the effect after commenting on the first sentence:
Change it here to this, and then you Set the height of #innerOne to a fixed height
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn