Я читал, что может обернуть блочные элементы, но в ходе моего короткого тестирования это оказалось совсем не так. В приведенной ниже демонстрации он закрывается при открытии .
Есть ли лучшее решение?
Код: Выделить всё
.wrapper {
display: inline-block
}Код: Выделить всё
The content I want to wrap:
wrap this pwrap this spanwrap this b[/b]
[b]
wrap this h2
div (valid but changes layout):
wrap this pwrap this spanwrap this b[/b]
[b]
wrap this h2
a (not valid, cannot wrap block elements):
wrap this pwrap this spanwrap this b[/b]
[b]
wrap this h2
span (not technically valid):
wrap this pwrap this spanwrap this b[/b]
[b]
wrap this h2
div inline-block (makes everything inline and has formatting issues like the p gets closed early):
wrap this pwrap this spanwrap this b[/b]
wrap this h2Подробнее здесь: https://stackoverflow.com/questions/797 ... ick-hitbox