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

How to implement Multi-column layout with css

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article mainly introduces css how to achieve multi-column layout, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Multi-column layout

.body {width:500px;margin:10px;border:dashed 1px orange;overflow:hidden;} .wrap3 {float:left;width:100%;}. Wrap3 .content {height:200px;margin-right:100px;background:rgba

The code is simple.

Add a parent element to the content element, set the left float, and the width is 100%

The content element sets the right margin, and the value is equal to the width of right

Right floats to the left, then sets the negative margin of its width

Right should have been displayed on the second line, but the left float of its width makes it to the right of the first line, covering a part of wrap, but content has the right margin of right width, and the coverage area has no content, so the two-column layout is realized.

Thank you for reading this article carefully. I hope the article "how to achieve multi-column layout in css" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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