<tfoot id='uUSHh'></tfoot>

  1. <small id='uUSHh'></small><noframes id='uUSHh'>

    • <bdo id='uUSHh'></bdo><ul id='uUSHh'></ul>

      <i id='uUSHh'><tr id='uUSHh'><dt id='uUSHh'><q id='uUSHh'><span id='uUSHh'><b id='uUSHh'><form id='uUSHh'><ins id='uUSHh'></ins><ul id='uUSHh'></ul><sub id='uUSHh'></sub></form><legend id='uUSHh'></legend><bdo id='uUSHh'><pre id='uUSHh'><center id='uUSHh'></center></pre></bdo></b><th id='uUSHh'></th></span></q></dt></tr></i><div id='uUSHh'><tfoot id='uUSHh'></tfoot><dl id='uUSHh'><fieldset id='uUSHh'></fieldset></dl></div>
      <legend id='uUSHh'><style id='uUSHh'><dir id='uUSHh'><q id='uUSHh'></q></dir></style></legend>

      CSS中不规则多边形的悬停效果

      Hover effects on irregular polygons in CSS(CSS中不规则多边形的悬停效果)
        <tbody id='6YlNY'></tbody>
      <i id='6YlNY'><tr id='6YlNY'><dt id='6YlNY'><q id='6YlNY'><span id='6YlNY'><b id='6YlNY'><form id='6YlNY'><ins id='6YlNY'></ins><ul id='6YlNY'></ul><sub id='6YlNY'></sub></form><legend id='6YlNY'></legend><bdo id='6YlNY'><pre id='6YlNY'><center id='6YlNY'></center></pre></bdo></b><th id='6YlNY'></th></span></q></dt></tr></i><div id='6YlNY'><tfoot id='6YlNY'></tfoot><dl id='6YlNY'><fieldset id='6YlNY'></fieldset></dl></div>
    1. <tfoot id='6YlNY'></tfoot>

      <small id='6YlNY'></small><noframes id='6YlNY'>

          <legend id='6YlNY'><style id='6YlNY'><dir id='6YlNY'><q id='6YlNY'></q></dir></style></legend>

                <bdo id='6YlNY'></bdo><ul id='6YlNY'></ul>
              • 本文介绍了CSS中不规则多边形的悬停效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想知道如何为类似于 这张图片.

                I'm wondering how to go about marking up and coding hover effects for a map similar to this image.

                当每个区域(或部分)被鼠标悬停/触摸/单击时,我需要更改它的颜色而不影响任何其他部分.每个部分的边界必须代表图像,而不是正方形.该解决方案不能使用画布,因为我正在处理的网站必须可以在旧版浏览器中使用(我个人很沮丧.)

                When each district (or section) is moused over/touched/clicked I need to change the colour of it without affecting any other section. The boundaries on each section must be representative of the image and shouldn't be squares. The solution can't use canvas since the site I'm working on has to be usable in older browsers (I'm gutted, personally.)

                理想情况下,我希望使用 CSS 来实现这一点,而无需使用过多的 JavaScript 或大量图像.以前有人做过吗?

                Ideally I want to do this with CSS without using too much JavaScript or loads of images. Has anyone done this before?

                我知道人们建议使用 <area> 标签,但是 AFAIK,它不接受 :hover 伪类.

                I know people are suggesting the <area> tag, but AFAIK, it doesn't accept the :hover pseudo class.

                编辑 2:我可能会使用这个:http://www.netzgesta.de/mapper/

                Edit 2: I might use this: http://www.netzgesta.de/mapper/

                推荐答案

                另一个自我回答...

                几个月前,我遇到了一个名为 Raphael JS 的库 - http://raphaeljs.com/.对于那些不熟悉它的人,它首先是一个 SVG DOM 库.如果您对 SVG 有所了解,您就会知道 IE 不支持它,但它支持 VML.拉斐尔也迎合了这一点.太棒了,对吧?

                A few months ago I came across a library called Raphael JS - http://raphaeljs.com/. For those of you unfamiliar with it, it's an SVG DOM library first and foremost. If you know a thing or two about SVG, you'll know that IE doesn't support it, but it does support VML. Raphael caters for this as well. Awesome, right?

                无论如何,我最终将地图的 AI 文件保存为 SVG 文件并将路径导入 JSON 块,基本上与以下代码执行相同的操作:http://raphaeljs.com/australia.html

                Anyway, I ended up saving the AI file for the map as an SVG file and importing the paths into a JSON block, basically doing the same thing as this code: http://raphaeljs.com/australia.html

                我遇到的唯一问题:

                • 我希望地图背景是透明的.将填充设置为透明,同时允许该部分接受鼠标悬停在 Firefox 中有效,但在 IE 中,它失败了.相反,我选择用白色填充路径,然后将不透明度设置为 0.01.之后我复制了路径并且没有填充它来创建边框.

                这篇关于CSS中不规则多边形的悬停效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                在开发JS过程中,会经常遇到两个小数相运算的情况,但是运算结果却与预期不同,调试一下发现计算结果竟然有那么长一串尾巴。如下图所示: 产生原因: JavaScript对小数运算会先转成二进制,运算完毕再转回十进制,过程中会有丢失,不过不是所有的小数间运算会
                问题描述: 在javascript中引用js代码,然后导致反斜杠丢失,发现字符串中的所有\信息丢失。比如在js中引用input type=text onkeyup=value=value.replace(/[^\d]/g,) ,结果导致正则表达式中的\丢失。 问题原因: 该字符串含有\,javascript对字符串进行了转
                Rails/Javascript: How to inject rails variables into (very) simple javascript(Rails/Javascript:如何将 rails 变量注入(非常)简单的 javascript)
                CoffeeScript always returns in anonymous function(CoffeeScript 总是以匿名函数返回)
                Ordinals in words javascript(javascript中的序数)
                getFullYear returns year before on first day of year(getFullYear 在一年的第一天返回前一年)
                  <bdo id='fHNTh'></bdo><ul id='fHNTh'></ul>

                          <tbody id='fHNTh'></tbody>
                      • <legend id='fHNTh'><style id='fHNTh'><dir id='fHNTh'><q id='fHNTh'></q></dir></style></legend>
                        <tfoot id='fHNTh'></tfoot>

                        1. <small id='fHNTh'></small><noframes id='fHNTh'>

                          <i id='fHNTh'><tr id='fHNTh'><dt id='fHNTh'><q id='fHNTh'><span id='fHNTh'><b id='fHNTh'><form id='fHNTh'><ins id='fHNTh'></ins><ul id='fHNTh'></ul><sub id='fHNTh'></sub></form><legend id='fHNTh'></legend><bdo id='fHNTh'><pre id='fHNTh'><center id='fHNTh'></center></pre></bdo></b><th id='fHNTh'></th></span></q></dt></tr></i><div id='fHNTh'><tfoot id='fHNTh'></tfoot><dl id='fHNTh'><fieldset id='fHNTh'></fieldset></dl></div>