Home > Web Front-end > HTML Tutorial > 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
Release: 2023-08-28 20:13:02
forward
793 people have browsed it

使用较新的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*/
}
Copy after login

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*/
}
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template