html - 如何设置特定于 mozilla 的 div 宽度

标签 html css firefox mozilla

我正在使用 css 在 HTML 中设置一个 div 的宽度。我需要为 mozilla 设置一个特定的宽度。我能够找到特定于 mozilla 的边距标签,但无法获得宽度标签。下面是代码:

     .box2 {
        display: inline-block;
        width: calc( 100% - 211px);
        margin-left: 208px;
        -webkit-logical-width: calc(100% - 117px);
        -webkit-margin-start: 115px;
        **MOZILLA SPECIFIC WIDTH: calc(100% - 117px);**
        -moz-margin-start: 115px;
        border: 1px solid black;
        height: auto;
        min-height: 33px;
    }

最佳答案

是的,这是可能的。示例:

   @-moz-document url-prefix() {
        .box2  {
            width: 100px;
        }
    }

这里有很多关于 mozilla CSS 扩展的信息:https://developer.mozilla.org/en-US/docs/Web/CSS/Mozilla_Extensions

关于html - 如何设置特定于 mozilla 的 div 宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48260147/

相关文章:

css - 几个 CSS3 关键帧在 Firefox 19 中不起作用/位置错误

html - 打开/关闭模态时防止内容移动

html - 屏幕底部或页面底部的背景图像

html - 单击图像后失去不透明度过渡

html - 将鼠标悬停在图像上,更改另一个图像的 z-index

html - Web 字体仅在 Firefox 中看起来不稳定

javascript - 悬停时展开内容

css - 居中 CSS : margin-left and -right auto, 但有趣的结果

html - float 多行字段集

javascript - 从 JS 调用 Firefox 辅助函数