html - IE 上的框阴影 + 边框半径不起作用

标签 html css

我在 Windows 8.1 64 位的 ie 11 上有一个非常奇怪的错误。设置了边框半径的 div 上的框阴影与未设置任何边框半径的 div 上的框阴影不同 (

例子:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
.switchbtn1.first {border-right:none;border-radius:4px 0 0 4px;}
.switchbtn1.last {border-left:none;border-radius:0 4px 4px 0;}
.switchbtn1 {
  font-size:14px;
  line-height:14px;
  padding:3px 15px 6px;
  border:1px solid #E8BA66;
  float:left;
  box-shadow: 0px 3px 7px rgba(227, 168, 79, 0.6);
}
</style>
</head>

<body>  
  <div class="switchbtn1 first">un</div>
  <div class="switchbtn1">deux</div>
  <div class="switchbtn1 last">trois</div>        
</body>
</html>

结果是:

enter image description here

你看到有圆 Angular 的div上的box-shadow和没有圆 Angular 的div上的box-shadow是不一样的...

此错误不会在所有 IE11 上发生。例如,在 Windows 7 上的 IE11 上,它不会发生 seam

有什么想法吗?

最佳答案

与此有关? http://social.technet.microsoft.com/Forums/en-US/e262c912-5250-4996-acbc-41a8bcd11ba0/weird-ie-behavior-when-combining-drop-shadow-and-radius-css?forum=ieitprocurrentver

答案表明图形驱动程序有问题:

I turned off GPU rendering in the Advanced options and after I rebooted, the radius with drop shadow displays just fine....

关于html - IE 上的框阴影 + 边框半径不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24158922/

相关文章:

html - 我如何使我的 div 内容与 css 居中?

javascript - Jquery 函数没有被调用?

html - 像表格单元格和行一样定位 div

html - 即使分辨率独立对齐,按钮也不居中

javascript - 通过 id 问题更改值

javascript - Angular 6 - 如何读取特定于 Angular 属性

javascript - 谷歌图表 : modify toopl tip

jQuery .append() 在 IE、Safari 和 Chrome 中不起作用

css - 如何在 XSLT 上动态设置边距

javascript - 仅在较小的屏幕上显示图像