在 Firefox 中,以下 CSS 有效:
.fill-space {
text-align: justify;
text-justify: distribute; /*This property is not working */
text-align-last: center;
}
但它在 Chrome 中不起作用。我怎样才能让它在 Chrome 中工作?
在 Firefox 中,以下 CSS 有效:
.fill-space {
text-align: justify;
text-justify: distribute; /*This property is not working */
text-align-last: center;
}
但它在 Chrome 中不起作用。我怎样才能让它在 Chrome 中工作?
根据MDN,text-justify: distribute已弃用:
分发
inter-character:表现出与;相同的行为 保留此值是为了向后兼容。
试试text-justify: inter-character吧。
也想这样做。W3 的详细信息 - 基本上它还没有推出,看起来落后于实验性功能,需要在 chrome 上启用......但在 IE 上可用!!!!??????
https://www.w3schools.com/cssref/css3_pr_text-justify.asp
*此功能位于 Enable Experimental Web Platform Features 首选项后面(需要设置为 Enabled)。要在 Chrome 中更改首选项:在 Chrome 浏览器中输入“chrome://flags”。要在 Opera 中更改首选项:在 Opera 浏览器中输入“flags”。