Using :after to clear floating elements

后端 未结 5 959
失恋的感觉
失恋的感觉 2020-11-29 19:57

I have a list and the li\'s have a float:left;. The contents after the

    should be aligned correctly. Therefore i can build the following:
5条回答
  •  一个人的身影
    2020-11-29 20:54

    Use

    .wrapper:after {
        content : '\n';
    }
    

    Much like solution provided by Roko. It allows to insert/change content using : after and :before psuedo. For details check http://www.quirksmode.org/css/content.html

提交回复
热议问题