How to enable line break at hyphens on Firefox

前端 未结 2 1348
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-19 10:42

Chrome, IE, and Safari break lines at hyphens but Firefox doesn\'t.

Is there any way to make Firefox break lines at hyphens, like other browsers?

2条回答
  •  不思量自难忘°
    2021-02-19 11:16

    Insert the tag after the hyphen. This tag is not present in any HTML specification (yet—it is in HTML5 drafts), but it has worked for a long time in browsers.

    Firefox automatically treats a hyphen as allowing a line break after it when there are sufficiently many characters around the hyphen. But if you wish to allow line breaks more widely than that, use , e.g. pre-war.

提交回复
热议问题