html - -moz-溢出 : hidden not working in firefox

标签 html css firefox

我需要有 Mozilla Firefox 特定的 overflow: hidden 属性,这样它应该只适用于 Firefox。

Fiddle with issue

下面是问题演示的示例代码;

    <div class="container">
    <div class="hidmeinfirefox">I should be hidden in firefox</div>
</div>

    .container {

}
.container .hidmeinfirefox {
    height: 1px;
    width: 1px;
    -moz-overflow: hidden;
}

最佳答案

使用此代码

<style type="text/css">
@-moz-document url-prefix() {
    .hidmeinfirefox {
        overflow: hidden;
    }
}
</style>

关于html - -moz-溢出 : hidden not working in firefox,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29940978/

相关文章:

html - 如何在滚动页面时让一个 div 保持在其他 div 之上?

javascript - 对象在 panel.port.on 上返回两次

javascript - 如何使用jquery更改按钮单击时聚焦的内容可编辑元素的类?

html - 固定位置元素的绝对定位子元素不滚动

html - CSS 仅用于 HTML 的一部分

javascript - 在 Firefox 中运行 Protractor

html - 单选按钮在 chrome 中是圆形的,但在 firefox 中是方形的

javascript - 我可以在 JS 对象中设置文本样式吗?

javascript - HTML - PHP 中的 'onclick' 确认函数

javascript - 如何跟踪菜单中的 css 类?