我可以用CSS打开HTML <map> <area />灰度吗?

时间:2018-03-16 19:15:39

标签: html css image area

<area>元素是否可以通过CSS进行灰度化?

&#13;
&#13;
$(".shape").on("mouseenter", function(evt) {
  $(this).addClass("bw")
})
&#13;
.bw {
  filter: grayscale(100%);
}
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<img src="https://wallpaperbrowse.com/media/images/5611472-simple-images.png" class="image" height="500px" width="500px" usemap="#simple">

<map class="map" name="simple">
  <area class="poly shape" coords="87,64,85,170,205,174,205,64,143,64,109,64" shape="poly">
  <area class="circle shape" coords="419,258,123" shape="circle">
</map>
&#13;
&#13;
&#13;

View on JSFiddle

0 个答案:

没有答案