开发者社区 问答 正文

firefox和chrome的outline表现不同

outline在firefox和chrome的表现不同。

chrome的outline是元素盒子的宽高,
但是firefox的是,在所有元素的最外围!

问:有没有什么hack方法,让firefox的outline的表现和chrome的一致!!

展开
收起
杨冬芳 2016-06-02 11:44:40 2040 分享 版权
1 条回答
写回答
取消 提交回答
  • IT从业

    需要不占布局的边框?
    box-shadow 就可以
    Try this:

    #main {
        width: 150px;
        height: 150px;
        position: relative;
        margin: 50px;
        box-shadow: 0 0 0 1px #009fee;
    }
    2019-07-17 19:24:31
    赞同 展开评论
问答分类:
问答标签:
问答地址: