在Firefox上的选择中缺少边框右边 [英] Missing border-right in select on Firefox

查看:112
本文介绍了在Firefox上的选择中缺少边框右边的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我把select选择为宽度和padding-left的div,我的选项在右边没有边框。更重要的是,它发生只有当选择的宽度为118px,父级有15px的填充左!有人知道,发生了什么?

When I put select into div with width and padding-left, my options have no border on the right. What is more, it happend only if select have width 118px and parent have 15px of padding left! Someone have idea, what is going on?

我只是代码:

<!DOCTYPE html>
<html>
<head lang="en">
</head>
<body>
<div style="width: 1000px; padding-left: 15px;">
    <select style="width: 118px;">
        <option>a</option>
        <option>b</option>
        <option>c</option>
    </select>
</div>
</body>
</html>

结果:

这里是一个plunker:点击

Here is a plunker: click

它只会在Windows的firefox上发生。我在40.0.2版本上测试了它

It happend only on firefox on Windows. I tested it on 40.0.2 version

推荐答案

-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;

源: http://stackoverflow.com/a/11390432/4431269
问题来源: https://bugzilla.mozilla.org/show_bug.cgi?id=924068

并且善用GOOGLE!

And the good use of GOOGLE !

编辑(问题来源,解释)

阅读bugreport后,阅读,这是可能的,它与widows.size或分辨率有关。该问题可以解决,如前所述。

After reading the bugreport, i read that it is possible it has something to do with widows.size or resolution. the problem can be fix as explained previous.

这篇关于在Firefox上的选择中缺少边框右边的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆