CSS to line break before/after a particular `inline-block` item

后端 未结 9 1619
再見小時候
再見小時候 2020-11-27 09:36

Let\'s say I have this HTML:

Features

  • Smells Good
  • <
9条回答
  •  臣服心动
    2020-11-27 10:30

    You are not interested in a lot of "solutions" to your problem. I do not think there really is a good way to do what you want to do. Anything you insert using :after and content has exactly the same syntactic and semantic validity it would have done if you had just written it in there yourself.

    The tools CSS provide work. You should just float the lis and then clear: left when you want to start a new line, as you have mentioned:

    See an example: http://jsfiddle.net/marcuswhybrow/YMN7U/5/

提交回复
热议问题