-
The baseline of an inline-block that has no inline children, including text, is its bottom margin edge (or simply bottom edge if it has no bottom margin). This baseline is then aligned with the baselines of the rest of the text. This is mentioned at the very end of section 10 of the spec.
讨论(0)
-
Nothing is vertically top aligned, only content is missing. If you use <a> </a>
everything would be fine - look here. An empty inline tag has no baseline, so its bottom edge was used for alignment.
You have several solutions to align empty inline block tags:
- add
(and they won't be empty anymore)
- as BoltClock
suggested, add an invisible character in
:before
- change to vertical-align: bottom
讨论(0)
- 热议问题