Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of adaptive layout of css3 multi-orchid

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

The knowledge of this article "css3 Dolan adaptive layout method" is not understood by most people, so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "css3 Dolan adaptive layout method" article.

Adaptive Dolan layout (with margin boundary in the middle), is there any other way to deal with this besides percentage:

After thinking about it for a while, I found that the layout of box-flex was more inconvenient. Still use the: column-count attribute (the gap between the specified columns) to get closer to the scene more quickly.

Full demo:

Demo

* {margin:0;padding:0;}

/ * Multi-column adaptive layout * /

.newspaper {

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

-webkit-column-count:4; / * Safari and Chrome * /

Column-count:4

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

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

Column-gap:40px

}

/ * the content is centered vertically left and right * /

.newspaper .each {

Background:red;height:200px

Display:-webkit-flex

Display: flex

-webkit-align-items: center

Align-items: center

-webkit-justify-content: center

Justify-content: center

}

Content 1

Content 2

Content 3

Content 4

The above is about the content of this article on "css3 Dolan adaptive layout method". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more related knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report