Enable support for CSS3 ::outside pseudoelement

后端 未结 3 644
借酒劲吻你
借酒劲吻你 2021-01-04 10:26

I\'d like to be able to use the ::outside pseudoelement, but apparently none of the major browsers support it (based on my testing today).

Is there some

3条回答
  •  轮回少年
    2021-01-04 10:51

    It looks like you are using jQuery, and in which case, I would suggest a small modification to your code

    $('ol > li').wrapInner("

    ");

    It's a little cleaner and simpler to follow, without so many variables or function calls.

    Edit: As awe rightly points out, this is an optimisation of Marcins solution which...

    adds a p inside the li, which avoids the problem of breaking child selectors

提交回复
热议问题