When using Flex layout, you will find that when arranged horizontally, the height of all child items becomes the same. This is because Flex layout will default to:
It is very inconvenient to set the background color in this way. Then you can set align-items to flex-start or other values of the align-items attribute on the parent item, and the child item will maintain its own height. .fat{ display: flex; align-items:flex-start; } The effect is as follows: This is the end of this article about how to use Flex layout to keep child items at their own height. For more information about how to use Flex layout to keep child items at their own height, please search previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! |
<<: Use viewport in meta tag to define screen css
>>: Specific use of Mysql prepare preprocessing
This article example shares the specific code of ...
Here are some common MySQL commands for you: -- S...
Recently, when I was writing a WeChat applet, the...
Enable the service when you need it, and disable ...
Since the entire application needs to be deployed...
This article uses an example to describe the simp...
Table of contents Basic Introduction Getting Star...
Table of contents Preface 1. Use global unified o...
Table of contents Integrity constraints Definitio...
The multi-site feature of WordPress allows you to...
The development of Docker technology provides a m...
Part 1 HTML <html> -- start tag <head>...
Table of contents Preface 1. Nginx installation 1...
This article mainly records the effect of using j...
Flex(彈性布局) in CSS can flexibly control the layout...