html - Can I use CSS hover on this complex irregular shaped link -
i've looked @ lot of possible solutions this, still have not found 1 works. trying links glow on hover using css
i have tried use every version of rectangle encompass image link them, small , overlapped. there way incorporate poly coordinates css? think main issue css code glow on hover asks links size width , hgt px. html links irregular shaped x , y poly coords
here 1 of css trying hover not sure put in width/height area if not x , y coord?
/* wiki image glow */ .wikiimageglow { margin-bottom: 10px; width: px; height:px; display:block; background:transparent url('http://cdn.obsidianportal.com/assets/199195/weird4.jpg') center top no-repeat; } .wikiimageglow:hover { background-image: url('http://cdn.obsidianportal.com/assets/199539/character.jpg'); } here links
<img src="http://cdn.obsidianportal.com/assets/199195/weird4.jpg" width="654" height="690" border="0" usemap="#map" /> <map name="map" id="map"> <area shape="poly" coords="351,81,386,317,335,295,302,215" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/game-master-information" /> <area shape="poly" coords="567,202,405,376,390,321,435,243" href="http://www.obsidianportal.com/campaigns/runelords-of-lord-ao/items" /> <area shape="poly" coords="368,426,403,379,491,365,608,445" href="http://www.obsidianportal.com/campaigns/runelords-of-lord-ao/characters" /> <area shape="poly" coords="308,430,364,427,430,489,443,628" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/critical-hits-and-misses" /> <area shape="poly" coords="268,383,305,428,296,514,195,616" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/character-creation" /> <area shape="poly" coords="279,323,270,378,198,431,53,412" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/adventure-log" /> <area shape="poly" coords="126,173,332,296,281,321,197,298" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/geography" /> <area shape="poly" coords="145,530,151,485,199,457,179,507" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/pride" /> <area shape="poly" coords="109,352,99,318,107,288,139,270,159,305,151,335" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/wrath" /> <area shape="poly" coords="220,144,232,139,286,143,292,164,254,189,228,185" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/gluttony" /> <area shape="poly" coords="432,142,463,142,480,152,461,174,415,211,414,174" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/greed" /> <area shape="poly" coords="524,287,551,302,564,358,535,355" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/sloth" /> <area shape="poly" coords="520,469,501,506,459,524,463,499,498,472" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/envy" /> <area shape="poly" coords="323,522,343,562,337,594,328,606,307,578" href="http://www.obsidianportal.com/campaign/runelords-of-lord-ao/wikis/lust" /> </map>
i think can't solved css , html only. but, i've found out nice jquery script. uses map markup , creates canvas elements.
maphilight jquery plugin adds visual hilights image maps.
it provides single jquery function: $('.foo').maphilight()
in ie vml used. in other browsers canvas used. maphilight has been tested in firefox, ie, safari, chrome, , opera.
note: script doesn't work in latest version of jquery, jquery-migrate fixed that.
here jsfiddle
Comments
Post a Comment