我在互联网上搜索过,但我没有得到任何解决方案。
任何人都可以说在IE 11和IE 12中css3 filter
和transistion3d
的替代方案是什么?
我不想使用任何插件。
不适用于SVG我想要<img>
标签
您可以尝试添加两种图像,一种是原始图像,另一种是灰度图像。然后,使用div显示这些图像。像这样:
<style>
.grayscale {
background-image: url('images/Image1.jpg');
background-size: cover; /* <------ */
background-repeat: no-repeat;
background-position: center center;
}
.grayscale:hover {
background-image: url('images/imag1_gray.PNG') ;
background-size: cover; /* <------ */
background-repeat: no-repeat;
background-position: center center;
}
</style>
<div class="grayscale" style="width:500px; height:500px">
</div>
结果是这样的:
在我的选择中,我更喜欢使用一些JQuery插件,如this。