CSS adaptive three-column layout

CSS layout is the basis of this, there are many methods, pay attention to the knowledge there are some.

For example, the trigger layout of IE6 * zoom: 1

For example, after using a floating clear float clear: both

There will be some demand for extension:

For example, three columns high

For example, the left column or right column fixed is position: fixed use, of course, does not support ie6

The basic structure of the code:

<div class="con">
    <div class="left"></div>
    <div class="main"></div>
    <div class="right"></div>
</div>

 

According to the use of knowledge to sum up what ways

A relative positioning scheme

  Full absolute

      + Absolute right column left column

Option II negative margin

      float+负margin

      inline-block+负margin

Program III elastomeric flex-box box model

 

Reproduced in: https: //www.cnblogs.com/jamesldj/p/3354651.html

Guess you like

Origin blog.csdn.net/weixin_34054931/article/details/93771022