【发布时间】:2016-07-15 16:25:57
【问题描述】:
我想在 svg 地图中添加缓进出悬停效果。我正在通过路径的笔划宽度创建悬停。这可能吗? 欢迎任何其他在 svg 地图中使用缓动创建此类悬停的建议。谢谢!
<!DOCTYPE html>
<html>
<head xmlns="http://www.w3.org/1999/xlink">
<meta charset="UTF-8">
<title>SVG Hover</title>
</head>
<body>
<svg xmlns="http://www.w3.org/2000/svg" height="56mm" width="56mm" version="1.1" viewBox="0 0 200 200">
<g id="layer1" transform="translate(-277.14 -332.36)">
<rect id="rect3336" height="200" width="200" y="332.36" x="277.14" fill="#cecece"/>
<circle id="path4138" cx="380" cy="430" r="15"
onmouseover="this.style.stroke = '#3f27dd'; this.style['stroke-width'] = 50; this.style['stroke-opacity'] = 0.7;"
onmouseout="this.style.stroke = '#3f27dd'; this.style['stroke-width'] = 0;"/>
</g>
</body>
</html>
【问题讨论】:
标签: svg hover onmouseover onmouseout