This article introduces the sample code of CSS3 column to realize the card waterfall layout, which is shared with you as follows: Achieve results Today I encountered the problem of implementing a waterfall layout of cards, and the heights of the cards were different. Finally, I used the column attribute in CSS3 to implement this layout, and it was very simple (I vaguely remember that the last time I wrote the waterfall flow, I used JS to implement it... naive) The effect is as follows: Related properties
Problems encountered
Code .videoCards { padding-top: 4rpx; column-count: 2; column-gap: 18rpx; .card { display: inline-block; margin-top: 20rpx; width: 326rpx; background: #FFFFFF; box-shadow: 0 0 10rpx 0 rgba(0,0,0,0.10); border-radius: 14rpx; break-inside: avoid; padding-bottom: 20rpx; overflow:auto; } } The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: How to use domestic image warehouse for Docker
When configuring web.xml for tomcat, servlet is a...
Preface: During database operation and maintenanc...
1. Implementation principle of Nginx load balanci...
CocosCreator version: 2.3.4 Most games have layer...
Today, I am sharing the valuable experience of a ...
The <marquee> tag is a tag that appears in ...
Table of contents 1. Understand the basics 2. Con...
The property of centering text in CSS is very simp...
Detailed explanation of the usage of DECIMAL in M...
Preface In the case of primary key conflict or un...
This article describes the Linux file management ...
Implement div wheel zooming in and out in Vue pro...
This article example shares the specific code of ...
In order to enhance the ability to write JavaScri...
Anyone who has a little knowledge of data operati...