cuốn sách gpt4 ai đã làm

Làm cách nào để trình duyệt/công cụ kết xuất biết nơi kết nối các từ?

In lại Tác giả: Walker 123 更新时间:2023-11-28 06:43:37 30 4
mua khóa gpt4 Nike

在我的 CSS 中,我使用了以下代码片段:

ngắt từ: ngắt từ;
-webkit-hyphens: auto;
hyphens: auto;

渲染引擎如何知道在所有不同语言中从哪里截断一个词?在荷兰语中,它是完美无缺的,就像母语人士会连字符一样。

câu trả lời hay nhất

từW3c spec

CSS Text Level 3 does not define the exact rules for hyphenation, however UAs are strongly encouraged to optimize their line-breaking implementation to choose good break points and appropriate hyphenation points. Hyphenation opportunities are considered when calculating ‘min-content’ intrinsic sizes.

Correct automatic hyphenation requires a hyphenation resource appropriate to the language of the text being broken. The UA is therefore only required to automatically hyphenate text for which the author has declared a language (e.g. via HTML lang or XML xml:lang) and for which it has an appropriate hyphenation resource.

因此,基本上,每个浏览器都实现了自己对连字符放置位置的定义。可能是专有的组合多语言词典。

Xem thêm hyphenate-resource

关于css - 浏览器/渲染引擎如何知道在哪里连接单词?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34159546/

30 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress