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
What is a Viewport Mobile browsers place web page...
<br />According to statistics, the average s...
What is ELK? ELK is a complete set of log collect...
This article example shares the specific code of ...
background Recently, some friends who are new to ...
This article shares with you a js special effect ...
Two days ago, I took advantage of the Double 11 s...
1. [admin@JD ~]$ cd opt #Enter opt in the root di...
Preface During development, we often encounter va...
At the beginning, I felt sad. The screenshots are...
Table of contents 1. Effect 2. Main code 1. Effec...
background All of the company's servers are p...
Server Information Management server: m01 172.16....
Background <br />Students who work on the fr...
1. Introduction This article mainly explains how ...