关于float的再研究

使用float时,一定要注意以下几点:

1、如果内部有float浮动层时,外部的层最后在内部结尾时,最好用clear:both清除。如果本身也是float,则不用。

2、float浮动层要,如果并列有好几个,第一个一定要用display:inline(兼容IE6,消除双边距问题),最后一个层如果不是浮动的话,要加上overflow:hidden。

3、注意margin问题。如果前一个层向左浮动,margin-left不会起作用,反之,前一个层向右浮动,margin-right不起作用。

 

Comments

No comments so far.
  • Leave a Reply
     
    Your gravatar
    Your Name
     
     
     
     
     
 
About This Website

Lamp development & SEO & Plan of Website & Project Managment

Learn more »
Follow Us (SNS)
Help & Support

more about Bruce.xu»

Get in touch

QQ: +252339382
Email: shjuto @ gmail.com

Online contact form »