Home  >  Article  >  Web Front-end  >  Implement Flexbox and vertical scrolling in full-screen apps using the newer Flexbox API and HTML

Implement Flexbox and vertical scrolling in full-screen apps using the newer Flexbox API and HTML

PHPz
PHPzforward
2023-08-28 20:13:02731browse

使用较新的Flexbox API和HTML,在全屏应用中实现Flexbox和垂直滚动

The flex property is shorthand for the flex-grow, flex-shrink, and flex-basis properties. The flex property sets the flexible length of the flex item.

For example -

#container article {
   -webkit-flex: 1 1 auto;
   overflow-y: auto;
   height: 0px; /*here the height is set to 0px*/
}

If you want a minimum height, use height: 100px; it is exactly the same as - min-height: 100px;;

#container article {
   -webkit-flex: 1 1 auto;
   overflow-y: auto;
   height: 100px; /*here the height is set to 100px*/
}

The above is the detailed content of Implement Flexbox and vertical scrolling in full-screen apps using the newer Flexbox API and HTML. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete