How to make an empty div take space

前端 未结 12 1669
广开言路
广开言路 2020-12-12 13:03

This is my 960 grid system case:

ID
12条回答
  •  离开以前
    2020-12-12 13:30

    You can:

    o Set .kundregister_grid_1 to:

    • width(or width-min) with height (or min-height)
    • or padding-top
    • or padding-bottom
    • or border-top
    • or border-bottom

    o Or use pseudo-elements: ::before or ::after with:

    • {content: "\200B";}
    • or {content: "."; visibility: hidden;}.

    o Or put   inside empty element, but this sometimes can bring unexpected effects eg. in combination with text-decoration: underline;

提交回复
热议问题