css - Div 在 IE 兼容模式下移动

标签 css internet-explorer html cross-browser

当选中兼容模式时,由于某些原因在 IE 上,广告框上的“关闭播放”按钮向右移动

截图:

enter image description here

http://piclair.com/data/2sm0j.jpg

网址:http://www.animefushigi.com/sacred-seven-episode-6/4

关于如何修复的任何想法?

最佳答案

I believe the problem may be the margin-left. But without that then it will look correct on other browsers.

margin-left: 42% 替换为 margin: auto :)

之所以有效,是因为:http://www.w3.org/TR/CSS21/visudet.html#blockwidth

Block-level, non-replaced elements in normal flow

If both 'margin-left' and 'margin-right' are 'auto', their used values are equal. This horizontally centers the element with respect to the edges of the containing block.

关于css - Div 在 IE 兼容模式下移动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6976337/

相关文章:

jquery - 如何在不影响 Bootstrap 面板类的情况下将 <fieldset> 堆叠在一起?

php - 如何添加tr :nth-child inside tag table?

css - Internet Explorer 显示轮廓偏移的 CSS 问题

html - 如何添加来自不同域的 Internet Explorer 行为文件 (.htc)?

c++ - 使用 C/C++ 自动化 Internet Explorer

javascript - jQuery 不响应定时事件

javascript - 首次单击某个按钮时到处都是 Div

css - 为什么这个 CSS 动画在 IE10 中不起作用?

javascript - 下拉菜单没有反应

java - html 文件中未找到类异常 Applet.jar