Get the App
SLTechnology News&Howtos  ›  Development  › 

How CSS3 creates multiple columns

Shulou Source: shulou.com Published: 2022-06-01 12:35:03 10月03日 Update

This article mainly introduces how CSS3 creates multiple columns, which has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.

CSS3 Creating Multiple Columns

The column-count property specifies the number of columns to split.

The following example divides the text in an element into three columns:

examples

div {

-webkit-column-count: 3; /* Chrome, Safari, Opera */

-moz-column-count: 3; /* Firefox */

column-count: 3;

}

CSS3 Gap between columns in multiple columns

The column-gap property specifies the gap between columns.

The following example specifies a column-to-column gap of 40 pixels:

examples

div {

-webkit-column-gap: 40px; /* Chrome, Safari, Opera */

-moz-column-gap: 40px; /* Firefox */

column-gap: 40px;

}

Thank you for reading this article carefully. I hope that the article "How to Create Multiple Columns in CSS3" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support you a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!

Tags: Examples articles gaps attributes values pixels elements interests at the same time text more friends knowledge editing industry information information channels channels references learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Apple Xiaomi Docker MariaDB