如果您使用的是 PIE ( pie.htc
) 的 DHTML 行为版本,请仅在您想要的元素上声明行为。就我而言,我有一个pie
类,我将它添加到需要饼图的元素中,然后像这样声明我的 CSS:
.pie { behavior: url(pie.htc); }
在你的情况下,你可以这样做:
.ie6 .pie, .ie8 .pie, .ie9 .pie { behavior: url(pie.htc); }
或者调整样板条件注释以.ienot7
在 IE 6、8 和 9 中添加一个类:
<!--[if lt IE 7 ]> <html class="ie6 ienot7"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8 ienot7"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9 ienot7"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
.ienot7 .pie { behavior: url(pie.htc); }