简体   繁体   English

如何在Firefox中修复截止复选框元素?

[英]How do I fix a cut-off checkbox element in Firefox?

I'm on FF 43.0.3, Mac OS 10.9.3. 我使用的是FF 43.0.3,Mac OS 10.9.3。 FF is cutting of the native checkbox on the right. FF正在削减右侧的本机复选框。 It's not a css problem on my part; 就我而言,这不是一个CSS问题。 I confirmed the cutting off in CodePen. 我确认了CodePen中的截止日期。 I also viewed a couple of random sites with checkmarks, and I see the same. 我还查看了几个带有复选标记的随机站点,并且看到了相同的内容。 I made sure to reset my browser zoom to default, and the default font is Times at 16px. 我确保将浏览器缩放比例重置为默认值,默认字体为Times at 16px。 I also tried turning off hardware acceleration via Preferences as another site suggested. 我还尝试通过另一个网站建议通过“首选项”关闭硬件加速。 Didn't work. 没用 The only code I have in my CodePen example is <input type="checkbox"> 我在CodePen示例中拥有的唯一代码是<input type="checkbox">

在此处输入图片说明

Would love to hear any suggestions. 希望听到任何建议。

This happens because of styling issues, and appears differently on different browsers. 发生这种情况是由于样式问题,在不同的浏览器上会出现不同的情况。 So try fixing the styling of the checkbox element and it's parent element, add some or all of these styles: 因此,尝试修复checkbox元素及其父元素的样式,添加一些或所有这些样式:

#parent-element { /*Or Whatever The ID Of The Parent Element Is*/
     line-height: 20px;
     height: 20px;
     display: block
}
#checkbox-element { /*Or Whatever The ID Of The Checkbox Element Is*/
     display: block;
     height: 20px
}

Try changing the styles of the elements with different values to suit your needs. 尝试更改具有不同值的元素样式以适合您的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM