【发布时间】:2013-07-09 21:18:37
【问题描述】:
我正在开发自己的网站,它的“功能”之一是当我将鼠标悬停在标题上时,它会向下滑动。
这适用于所有主要浏览器。但是,对于 IE 10,它不会。以下是页面来源:
<?php
echo "<html>
<head>
<title>memodesigns</title>
<link rel='stylesheet' href='style/stylesheet.css'>
</head>
<body>";
include_once('modules/header.php');
echo "
</body>
</html>";
?>
这是包含的头文件:
<?php
echo "<div id = 'menucontainer'>
<div id = 'menu'>
<p>
<ul>
<li><a class = 'menu' href = ''>HOME</a></li>
<li><a class = 'menu' href = 'about.php'>ABOUT</a></li>
<li><a class = 'menu' href = 'portfolio.php'>PORTFOLIO</a></li>
<li><a class = 'menu' href = 'rates.php'>RATES</a></li>
<li><a class = 'menu' href = 'contact.php'>CONTACT</a></li>
</ul>
</p>
</div>
</div>";
?>
以及这里使用的 CSS 样式:
a.menu{
padding-left: 20px;
padding-right: 20px;
}
/*menucontainer*/
#menucontainer{
position: absolute;
margin-top: -8px;
top: 0px;
width: 100%;
text-align: center;
-webkit-transition: margin-top 0.5s;
-moz-transition: margin-top 0.5s;
-o-transition: margin-top 0.5s;
transition: margin-top 0.5s;
}
/*menucontainer*/
#menucontainer:hover{
margin-top: 0px;
}
/*menu*/
#menu{
padding-top: 5px;
margin-left: auto;
margin-right: auto;
border-bottom-left-radius: 12px;
border-bottom-right-radius: 12px;
-moz-border-radius-bottomleft: 12px;
-moz-border-radius-bottomright: 12px;
max-width: 75%;
height: 25px;
background-color: #202020;
font-family: Roboto;
color: #f3f4f4;
font-size: 16px;
}
不胜感激任何关于为什么过渡在 IE 中不工作,但在其他主要浏览器上工作的帮助。
【问题讨论】:
-
欢迎使用 Internet Explorer。你不会享受你的逗留。
-
我建议不要像你那样链接到一个未知的网站。尝试 jsbin 或 jsfiddle 或类似的东西。
-
@DMoses 页面很干净。另外,另一方面,我已经使用 BrowserStack 在 Windows 7 上的 IE 10 中确认了这一点。
-
有什么特别的原因吗?这两个网站似乎面向 HTML 和 Javascript,而不是 PHP。编辑:谢谢伊恩卡罗尔
-
不会有那么多人从这里点击未知域。伊恩经历了我们大多数人都懒得做的一步:)
标签: css internet-explorer transitions