我在使用该站点时遇到跨浏览器问题,有人可以向我解释为什么它在 Firefox 中不起作用,但在 google chrome 中可以吗?
单击图像时,文本在 Firefox 中的位置不正确
http://dl.dropbox.com/u/2306276/problem/index.html
我觉得有关系
display: table;
但我不知道为什么。
谢谢
最佳答案
更改 CSS 的这些部分:
div.container {
height: 215px;
line-height: 215px;
width: 215px;
text-align: center;
}
div.child {
display: inline-block;
margin: 0;
position: relative;
vertical-align: middle;
}
通常情况下,尽可能避免使用 display: table-*
会更安全。
关于html - CSS 布局困难,站点在 chrome 中表现良好,但在 Firefox 中表现不佳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7944398/