How to solve the problem that the div cannot adapt to the height and cannot change with the height of the picture?
This article mainly explains "how to solve the problem that div cannot adapt to the height of the picture and cannot change with the height of the picture." interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn "how to solve the problem that the div cannot adapt to the height of the picture and cannot change with the height of the picture."
In the column module of a web page, there are several pictures in one, but the height of the div is 0 and cannot change with the height of the picture.
As a workaround, set the overflow property to auto
The code is as follows:
...
At this point, I believe you have a deeper understanding of "how to solve the problem that the div cannot adapt to the height of the picture". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!