css - 边框:开始;只能在火狐浏览器中工作

标签 css cross-browser border

我有一张 table this page使用以下 css(每个 td 都有类 box)

.box{
    border: 3px outset #959595;
    width:25px;
    height: 25px;
    background-color: #dddddd;
    cursor: pointer;
}

table{
    border-collapse: collapse;
    border-spacing: 0px;
    border: 4px inset #444;
}

我在 Firefox 中得到了我想要的

firefox

但在任何其他浏览器中它似乎都没有按照我想要的方式工作

chrome

最佳答案

来自MDN's documentation on border-style (回复:outset):

Displays a border that makes the box appear in 3D, embossed. It is the opposite of inset. When applied to a table cell with border-collapse set to collapsed, this value behaves like ridge.

您的 table 有border-collapse: collapse; ,所以它实际上渲染为 border-style: ridge在火狐浏览器中。

任意设置border-collapse: separate;或设置border-style: ridge;跨浏览器标准化可能不会改变的样式 outsetridge .

关于css - 边框:开始;只能在火狐浏览器中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19137342/

相关文章:

html - 无法将 CSS 大纲重置为浏览器默认值

html - ie9 中的样式框 - CSS 跨浏览器问题

Java:如何在未修饰的 JFrame 周围绘制边框?

php - 我需要可以下载 php、html、css 教程的地方

javascript - 通过 JS 从多个样式表中获取 CSS 类内容

testing - 如何在我的本地主机上自动化 BrowserStack 截图 API?

html - 去除边界 Angular 的斜 Angular 效果

css - 边框干扰绝对定位

javascript - 宽度为 100% 的可扩展/可收缩列

css - 防止 Twitter Bootstrap 空 <dd> 填充下一个 <dd> 值