我有一些非常奇怪的行为与IE9,:悬停,以及CSS背景属性。
几乎就好像悬停和非悬停属性在它们不应该交换时(换句话说,悬停属性成为非悬停属性)。我只是用背景颜色和SVG渐变进行测试。这是测试代码(SVG代码已注释掉)。
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.highlights {
background:black;
/* SVG background gradient for #0791F3 to #068CE0 */
/*
background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9ImczMDkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiMwNzkxRjMiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiMwNjhDRTAiIG9mZnNldD0iMSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2czMDkpIiAvPgo8L3N2Zz4=);
*/
}
.highlights:hover {
background:gray;
/* SVG background gradient for #0064ff to #0051ff */
/*
background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc0NDEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+CjxzdG9wIHN0b3AtY29sb3I9IiMwMDY0RkYiIG9mZnNldD0iMCIvPjxzdG9wIHN0b3AtY29sb3I9IiMwMDUxRkYiIG9mZnNldD0iMSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c0NDEpIiAvPgo8L3N2Zz4=);
*/
}
</style>
</head>
<body>
<div class="highlights">
<h3 class="title" style="color:#FED704">The Quick Brown Fox Jumps Over The Lazy Dog</h3>
<p style="color:white;">This is smaller text</p>
</div>
</body>
</html>
[edit]:奇怪行为的视频(请记住,悬停时背景应显示为灰色):http://www.youtube.com/watch?v=8D4Oj25bPlg
答案 0 :(得分:1)
未启用软件渲染。一旦我启用它,问题就消失了。
互联网选项&gt; “高级标签”&gt;选中“使用软件渲染而不是GPU渲染”