表情符号导致行高发生变化

Abd*_*Abd 1 html css emoji

<p>Alternatively, you can use percentages, which
   will be calculated with respect to the width of the generated box's
   containing block. &#128517;Therefore, assuming the container's width
   is greater than the image's height, margin: -50% 0 should be enough.
   Hide code snippet
</p>
Run Code Online (Sandbox Code Playgroud)

表情符号增加行高如何避免插入表情符号时行高发生变化?

Kam*_*ron 5

您可以像这样设置固定值line-height

p {
  line-height: 20px !important;
}
Run Code Online (Sandbox Code Playgroud)
<p>Alternatively, you can use percentages, which
   will be calculated with respect to the width of the generated box's
   containing block. &#128517;Therefore, assuming the container's width
   is greater than the image's height, margin: -50% 0 should be enough.
   Hide code snippet
</p>
Run Code Online (Sandbox Code Playgroud)