为什么 Firefox 无法使用自定义“字母间距”正确调整“选择”标签的大小?

问题描述 投票:0回答:1

我在“选择”中添加了一些“字母间距”,我注意到 Firefox 不会改变渲染的“选择”的宽度,而 chromium 却会改变。

结果就是用户看不到select的全部内容。

<!DOCTYPE html>
<html>
    <head>
        <title>select input width with letter-spacing</title>
        <style>
        select {
            appearance: none;
            border: none;
            letter-spacing: 2px;
        }
        </style>
    </head>
    <body>
        <select>
            <option>hello world</option>
        </select>
    </body>
</html>

使用 Firefox 或 Chromium 尝试一下,看看有什么不同。

我尝试使用“宽度:最大内容”或类似的方法进行修复,但没有任何效果。

firefox select input width letter-spacing
1个回答
0
投票

这种情况不应该发生 - 我已经向 Mozilla 提交了错误报告,希望它能得到修复。

https://bugzilla.mozilla.org/show_bug.cgi?id=1851397

© www.soinside.com 2019 - 2024. All rights reserved.