How does HTML set scroll bars for pages (simple, easy to understand)

When the visible window of a certain size is given in the page, and the size of the content is larger than the visible window, it is necessary at this time to realize the scrolling effect of the page:

At this time, you need to add overflow: scroll to the outermost box , and set the height to dead and fixed.

.rigth-content-bottom{
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: 2px;
  margin-top: 16px;
  //这下面的两段代码是最主要的
  overflow: scroll;
  height: 840px;
}

At this point, the scrolling effect of the page is realized

Guess you like

Origin blog.csdn.net/m0_60237095/article/details/129667290