将鼠标悬停在文本 SVG MAP 上时出错

Error while hover on text SVG MAP(将鼠标悬停在文本 SVG MAP 上时出错)

本文介绍了将鼠标悬停在文本 SVG MAP 上时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有美国地图

body{
	background-color:  ;
}



#CA {
	fill: #3decff;
}

#OR{
	fill: #3e4fa1;
}


#WA{
	fill: #33c5f4;
}


#MT {
	fill: #54C2B7;
}

#ID {
	fill:#8BE652;
}


#WY {
	fill: #EF1E94;
}

#NV {
	fill: #AF5FBF;
}

#UT {
	fill: #3E4FA1;
}

#AZ {
	fill: #8BE652;
}

#CO{

}


#NM{

}

#CO {
	fill: #F9EC20;
}

#NM {
	fill: #AF5FBF;
}

#ND {
	fill: #00CC95;
}

#SD {
	fill: #8BE652;
}

#NE {
	fill: #E3FF3A;
}

#KS {
	fill: #8A54BA;
}

#OK {
	fill: #EF1E94;
}


#TX {
	fill: #4F88DC;
}


#MN{
	fill: #F15022;
}

#IA{
	fill: #EF1E94;
}

#MO{
	fill: #4F88DC;
}

#AR{
	fill: #8BE652;
}

#LA{
	fill: #AF5FBF;
}

#WI{
	fill: #55C2FF;
}

#IL{
	fill: #8BE652;
}

#MI-{
	fill: #65CADE;
}

#IN{
	fill: #FFE91A;
}

#OH {
	fill: #79F2FF;
}

#KY {
	fill: #AC7D47;
}

#TN {
	fill: #8B1F66;
}

#MS {
	fill: #55C2FF;
}

#AL {
	fill: #FF6029;
}

#GA {
	fill: #8A54BA;
}

#FL {
	fill: #3DECFF;
}

#SC {
	fill: #8B1F66;
}

#NC {
	fill: #4F88DC;
}

#WV{
	fill: #4A5FC1;
}

#VA{
	fill: #3DECFF;
}

#PA{
	fill: #C02A28;
}

#NY {
	fill: #3DECFF;
}

#ME {
	fill: #55C2FF;
}

#AK {
	fill: #33C5F4;
}

#HI {
	fill: #4F88DC;
}

#SP- {
	fill: #FF6029;
}

#MD {
	fill: #4F88DC;
}

#DE {
	fill: #8B1F66;
}

#NJ {
	fill: #AF5FBF;
}

#VT {
	fill: #FFE91A;
}

#NH {
	fill:#8B1F66;
}

#MA {
	fill: #8BE652;
}

#CT {
	fill: #4A5FC1;
}

#RI {
	fill: #8B1F66;
}



.mapdiv{
	width: 80%;
	margin: auto;
}

.region path{
	 
}


.region:hover path{
	
	fill: #D3D3D3 !important;
	cursor:pointer !important;
	z-inde
	
}

text{
	
	cursor:pointer !important;
	z-index: -1 !important;
	
}

.ragion:hover a {
	shape-outside: 
}

<!DOCTYPE html>
<html>
<head>
	<title>Us Map</title>
	<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>


	<div class="mapdiv">
		
		<?xml version="1.0" encoding="utf-8"?>
		<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
		<svg version="1.1"
			 id="svg2" inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:version="0.46" sodipodi:docname="United States WIP.svg" sodipodi:version="0.32" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg"
			 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 959 593"
			 style="enable-background:new 0 0 959 593;" xml:space="preserve">
		<style type="text/css">
			.st0{fill:#D3D3D3;stroke:#FFFFFF;stroke-width:0.75;}
			.st1{fill:#002767;}
			.st2{font-family:'Arial-BoldMT';}
			
		</style>
		<defs>
			
			
				<inkscape:perspective  id="perspective64" inkscape:persp3d-origin="479.5 : 197.66667 : 1" inkscape:vp_x="0 : 296.5 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="959 : 296.5 : 1" sodipodi:type="inkscape:persp3d">
				</inkscape:perspective>
		</defs>
		<sodipodi:namedview  bordercolor="#666666" borderopacity="1.0" gridtolerance="10.0" guidetolerance="10.0" id="base" inkscape:current-layer="svg2" inkscape:cx="608.50443" inkscape:cy="298.13957" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="814" inkscape:window-width="1152" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:zoom="0.70710678" objecttolerance="10.0" pagecolor="#ffffff" showgrid="false" showguides="true">
			</sodipodi:namedview>




		<a class="region" xlink:title=" Pecific" xlink:href="https://google.com">
			
			<path id="CA" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccscc" class="st0" d="
			M144.7,382.2l3.9-0.5l1.5-2l0.5-2.9l-3.6-0.6l-0.5-0.7l0.5-2l-0.2-0.6l1.9-0.6l3-2.8l0.6-5l1.4-3.4l1.9-2.2l3.5-1.6l1.7-1.6l0.1-2.1
			l-1-0.6l-1-1.1l-1.2-5.8l-2.7-4.8l0.6-3.5l-2.4-1L84.3,232.5l18.9-67.6l-67.1-15.7l-1.5,4.7l-0.2,7.4l-5.2,11.8l-3.1,2.6l-0.3,1.1
			l-1.8,0.8l-1.5,4.2l-0.8,3.2l2.7,4.2l1.6,4.2l1.1,3.6l-0.3,6.5l-1.8,3.1l-0.6,5.8l-1,3.7l1.8,3.9l2.7,4.5l2.3,4.8l1.3,4l-0.3,3.2
			l-0.3,0.5v2.1l5.7,6.3l-0.5,2.4l-0.6,2.3l-0.6,1.9l0.2,8.2l2.1,3.7l1.9,2.6l2.7,0.5l1,2.7l-1.1,3.6l-2.1,1.6h-1.1l-0.8,3.9l0.5,2.9
			l3.2,4.4l1.6,5.3l1.5,4.7l1.3,3.1l3.4,5.8l1.5,2.6l0.5,2.9l1.6,1v2.4l-0.8,1.9l-1.8,7.1l-0.5,1.9l2.4,2.7l4.2,0.5l4.5,1.8l3.9,2.1
			h2.9l2.9,3.1l2.6,4.8l1.1,2.3l3.9,2.1l4.8,0.8l1.5,2.1l0.6,3.2l-1.5,0.6l0.3,1l3.2,0.8l2.7,0.2l3.2-1.7l3.9,4.2l0.8,2.3l2.6,4.2
			l0.3,3.2v9.4l0.5,1.8l10,1.5l19.7,2.7L144.7,382.2z M56.6,338.5l1.3,1.5l-0.2,1.3l-3.2-0.1l-0.6-1.2l-0.6-1.5L56.6,338.5z
			 M58.5,338.5l1.2-0.6l3.6,2.1l3.1,1.2l-0.9,0.6l-4.5-0.2l-1.6-1.6L58.5,338.5z M79.2,358.3l1.8,2.3l0.8,1l1.5,0.6l0.6-1.5l-1-1.8
			l-2.7-2l-1.1,0.2V358.3z M77.7,366.9l1.8,3.2l1.2,1.9l-1.5,0.2l-1.3-1.2c0,0-0.7-1.5-0.7-1.9s0-2.2,0-2.2L77.7,366.9z"/>

			<path id="OR" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccc" class="st0" d="M148.7,175.5l8.8-34.8
			l1.1-4.2l2.4-5.6l-0.6-1.2l-2.5,0l-1.3-1.7l0.5-1.5l0.5-3.2l4.5-5.5l1.8-1.1l1.1-1.1l1.5-3.6l4-5.7l3.6-3.9l0.2-3.5l-3.3-2.5
			l-1.8-4.6l-12.7-3.6l-15.1-3.5L126,84.9l-0.5-1.4l-5.5,2.1l-4.5-0.6l-2.4-1.6l-1.3,0.7l-4.7-0.2l-1.7-1.4l-5.3-2.1l-0.8,0.1L95.2,79
			l-1.9,1.8l-6.2-0.3l-5.9-4.1l0.7-0.8l0.2-7.8l-2.3-3.9l-4.1-0.6l-0.7-2.5l-2.4-0.5l-5.8,2.1l-2.3,6.5l-3.2,10l-3.2,6.5l-5,14.1
			L46.6,113l-8.1,12.6l-1.9,2.9l-0.8,8.6l0.4,12.1L148.7,175.5z"/>

			<path id="WA" sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccscccccc" class="st0" d="
			M102.1,7.6l4.4,1.5l9.7,2.7l8.6,1.9l20,5.7l23,5.7l15.2,3.2l-13.6,63.6l-12.4-3.5l-15.5-3.6l-15.2,0l-0.5-1.3l-5.6,2.2l-4.6-0.7
			l-2.1-1.6L112,84l-4.7-0.1l-1.7-1.3l-5.3-2.1l-0.7,0.1L95.2,79l-1.9,1.8L87,80.5l-5.9-4.1l0.8-0.9l0.1-7.7l-2.3-3.8l-4.1-0.6
			l-0.7-2.5l-2.3-0.5l-3.6,1.2l-2.3-3.2l0.3-2.9l2.7-0.3l1.6-4L68.9,50l0.2-3.7l4.4-0.6l-2.7-2.7l-1.5-7.1l0.6-2.9v-7.9l-1.8-3.2
			l2.3-9.4l2.1,0.5l2.4,2.9l2.7,2.6l3.2,1.9l4.5,2.1l3.1,0.6l2.9,1.5l3.4,1l2.3-0.2v-2.4l1.3-1.1l2.1-1.3l0.3,1.1l0.3,1.8l-2.3,0.5
			l-0.3,2.1l1.8,1.5l1.1,2.4l0.6,1.9l1.5-0.2l0.2-1.3l-1-1.3l-0.5-3.2l0.8-1.8l-0.6-1.5v-2.3l1.8-3.6l-1.1-2.6l-2.4-4.8l0.3-0.8
			L102.1,7.6z M92.6,13.6l2-0.2l0.5,1.4l1.5-1.6H99l0.8,1.5l-1.5,1.7l0.6,0.8l-0.7,2l-1.4,0.4c0,0-0.9,0.1-0.9-0.2s1.5-2.6,1.5-2.6
			l-1.7-0.6l-0.3,1.5l-0.7,0.6l-1.5-2.3L92.6,13.6z"/>

		</a>



		<a class="region" xlink:title=" Mountain" xlink:href="https://google.com">


			<path id="MT" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccc" class="st0" d="M369.2,57l-30.7-2.8l-29.3-3.6
			l-29.3-4l-32.3-5.3l-18.4-3.4l-32.7-6.9l-4.5,21.3l3.4,7.5l-1.4,4.6l1.8,4.6l3.2,1.4l4.6,10.8l2.7,3.2l0.5,1.1l3.4,1.1l0.5,2.1
			l-7.1,17.6v2.5l2.5,3.2h0.9l4.8-3l0.7-1.1l1.6,0.7l-0.2,5.3l2.7,12.6l3,2.5l0.9,0.7l1.8,2.3l-0.5,3.4l0.7,3.4l1.1,0.9l2.3-2.3h2.7
			l3.2,1.6l2.5-0.9h4.1l3.7,1.6l2.7-0.5l0.5-3l3-0.7l1.4,1.4l0.5,3.2l1.4,0.8l1.9-11l106.7,13.4L369.2,57z"/>
			<path id="CO" sodipodi:nodetypes="ccccc" class="st0" d="M380,321l4.9-86.3L271.5,222l-12.2,87.9L380,321z"/>
			<path id="ID" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" class="st0" d="M148.5,176.5
				l8.8-35.2l1.4-4.2l2.5-5.9l-1.3-2.3l-2.5,0.1l-0.8-1l0.5-1.1l0.3-3.1l4.5-5.5l1.8-0.5l1.1-1.1l0.6-3.2l0.9-0.7l3.9-5.8l3.9-4.3
				l0.2-3.8l-3.4-2.6l-1.5-4.4l13.6-63.3l13.5,2.5l-4.4,21.4l3.6,7.5l-1.6,4.7l2,4.6l3.1,1.3l3.8,9.6l3.5,4.4l0.5,1.1l3.3,1.1l0.4,2.1
				l-7,17.4l-0.2,2.6l2.6,3.3l0.9,0l4.9-3l0.7-1.1l1.6,0.7l-0.3,5.4l2.7,12.6l3.9,3.2l1.7,2.2l-0.7,4.1l1.1,2.8l1.1,1.1l2.5-2.4l2.8,0
				l2.9,1.3l2.8-0.7l3.8-0.2l4,1.6l2.7-0.3l0.5-3l2.9-0.8l1.3,1.5l0.4,2.9l1.4,1.2l-8.4,53.6C243.4,194.7,155.5,178,148.5,176.5z"/>
			<path id="UT" sodipodi:nodetypes="cccccccccc" class="st0" d="M259.5,310.1l-83.7-11.9l20.6-112.5l46.8,8.7l-1.5,10.6l-2.3,13.2
				l7.8,0.9l16.4,1.8l8.2,0.9L259.5,310.1z"/>
			<path id="AZ" sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccc" class="st0" d="M144.9,382.6l-2.6,2.2l-0.3,1.5
				l0.5,1l18.9,10.7l12.1,7.6l14.7,8.6l16.8,10l12.3,2.4l25,2.7l17.3-119.1l-83.7-11.9l-3.1,16.4l-1.6,0l-1.7,2.6l-2.5-0.1l-1.3-2.7
				l-2.7-0.3l-0.9-1.1H161l-0.9,0.6l-1.9,1l-0.1,7l-0.2,1.7l-0.6,12.6l-1.5,2.2l-0.6,3.3l2.7,4.9l1.3,5.8l0.8,1l1,0.6l-0.1,2.3
				l-1.6,1.4l-3.4,1.7l-1.9,1.9l-1.5,3.7l-0.6,4.9l-2.9,2.7l-2.1,0.7l0.1,0.8l-0.5,1.7l0.5,0.8l3.7,0.6l-0.6,2.7l-1.5,2.2L144.9,382.6z
				"/>
			<path id="NV" sodipodi:nodetypes="cccccccccccccccccc" class="st0" d="M196.4,185.6l-23.6,128.8l-1.8,0.3l-1.6,2.4l-2.4,0l-1.5-2.7
				l-2.6-0.4l-0.8-1.1l-1-0.1l-2.8,1.6l-0.3,6.8l-0.4,5.8l-0.3,8.6l-1.4,2.1l-2.4-1.1L84.3,232.5l19-67.6L196.4,185.6z"/>

			<path id="WY" sodipodi:nodetypes="ccccc" class="st0" d="M360.4,143.3l-106.7-13.5l-14.1,88.5l113.3,13.6L360.4,143.3z"/>
			<path id="NM" sodipodi:nodetypes="ccccccccccccccc" class="st0" d="M288.2,424l-0.8-4.7l8.6,0.5l30.2,2.9l27.3,1.7l2.2-18.7
			l3.9-55.9l1.7-19.4l1.6,0.1l0.8-11.2l-104-10.6l-17.5,120.4l15.5,2l1.3-10L288.2,424z"/>



		</a>






		<a class="region" xlink:title=" Mid-West" xlink:href="https://google.com">


			<path id="KS" sodipodi:nodetypes="ccccccccccccccccccccc" class="st0" d="M507.9,324.4l-12.6,0.2l-46.1-0.5l-44.6-2.1l-24.6-1.3
			l3.9-64.6l22.1,0.7l40.3,0.8l44.3,1h5.1l2.2,2.2l2,0l1.6,1l-0.1,3l-1.8,1.7l-0.3,2.2l1.8,3.4l3,3.2l2.3,1.6l1.3,11.2L507.9,324.4z"
			/>
			<path id="NE" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc" class="st0" d="M486.1,240.7l3.2,7l-0.1,2.3l3.5,5.5
				l2.7,3.2h-5l-43.5-0.9l-40.8-0.9l-22.3-0.8l1.1-21.3l-32.3-2.9l4.3-44l15.5,1l20.1,1.1l17.8,1.1l23.8,1.1l10.7-0.5l2.1,2.3l4.8,3
				l1.1,0.9l4.3-1.4l3.9-0.5l2.7-0.2l1.8,1.4l4.1,1.6l3,1.6l0.5,1.6l0.9,2.1h1.8l0.8,0l0.9,4.7l2.9,8.5l0.6,3.8l2.5,3.8l0.6,5.1
				l1.6,4.2L486.1,240.7z"/>
			<path id="SD" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc" class="st0" d="M476.4,204l0-0.6l-2.9-4.8l1.9-4.7
				l1.5-5.9l-2.8-2.1l-0.4-2.7l0.8-2.6l3.2,0l-0.1-5l-0.3-30.2l-0.6-3.8l-4.1-3.3l-1-1.7l-0.1-1.6l2-1.5l1.5-1.7l0.2-2.7l-58.3-1.6
				l-54.8-3.4l-5.3,63.7l14.6,0.9l19.9,1.2l17.7,0.9l23.8,1.3l12-0.4l2,2.2l5.2,3.3l0.8,0.7l4.5-1.5l6.5-0.6l1.7,1.3l4.2,1.6l2.9,1.6
				l0.4,1.5l1,2.2L476.4,204z"/>
			<path id="ND" sodipodi:nodetypes="ccccccccccccccccc" class="st0" d="M475.3,128.9l-0.6-8.4l-1.7-6.8l-1.9-13l-0.5-11l-1.7-3.1
				l-1.8-5.2l0-10.4l0.6-3.8l-1.8-5.5l-28.6-0.6l-18.6-0.6l-26.5-1.3L369.3,57l-7,67.2l54.9,3.3L475.3,128.9z"/>
			
			<path id="MN" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" class="st0" d="
				M475.2,128.8l-0.5-8.5L473,113l-1.8-13.5l-0.5-9.8l-1.8-3.4l-1.6-5V71l0.7-3.9l-1.8-5.5l30.1,0l0.3-8.2l0.6-0.2l2.3,0.5l1.9,0.8
				l0.8,5.5l1.5,6.1l1.6,1.6h4.8l0.3,1.5l6.3,0.3v2.1h4.8l0.3-1.3l1.1-1.1l2.3-0.6l1.3,1h2.9l3.9,2.6l5.3,2.4l2.4,0.5l0.5-1l1.5-0.5
				l0.5,2.9l2.6,1.3l0.5-0.5l1.3,0.2v2.1l2.6,1h3.1l1.6-0.8l3.2-3.2l2.6-0.5l0.8,1.8l0.5,1.3h1l1-0.8l8.9-0.3l1.8,3.1h0.6l0.7-1.1
				l4.4-0.4l-0.6,2.3l-3.9,1.8l-9.2,4.1l-4.8,2l-3.1,2.6l-2.4,3.6l-2.3,3.9l-1.8,0.8l-4.5,5l-1.3,0.2l-4.3,2.8l-2.5,3.2l-0.2,3.2l0.1,8
				l-1.4,1.7l-5.1,3.8l-2.2,6l2.9,2.2l0.7,3.2l-1.9,3.2l0.2,3.7l0.4,6.7l3,3h3.3l1.9,3.1l3.4,0.5l3.9,5.7l7.1,4.1l2.1,2.9l0.7,6.4
				l-81.2,1.1l-0.3-35.7l-0.5-3l-4.1-3.4l-1.1-1.8V135l2.1-1.6l1.4-1.4L475.2,128.8z"/>
			
			<path id="MO" sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" class="st0" d="M558.4,248.1
				l-2.5-3.1l-1.1-2.3l-64.4,2.4l-2.3,0.1l1.3,2.5l-0.2,2.3l2.5,3.9l3.1,4.1l3.1,2.7l2.2,0.2l1.5,0.9v3l-1.8,1.6l-0.5,2.3l2.1,3.4
				l2.5,3l2.5,1.8l1.4,11.7l0.3,36.1l0.2,4.7l0.5,5.4l22.4-0.9l23.2-0.7l20.8-0.8l11.7-0.2l2.2,3.4l-0.7,3.3l-3.1,2.4l-0.6,1.8l5.4,0.5
				l3.9-0.7l1.7-5.5l0.7-5.9l2.1-2.6l2.6-1.5l0.1-3.1l1-1.9l-1.7-2.5l-1.3,1l-2-2.2l-1.3-4.8l0.8-2.5l-1.9-3.4l-1.8-4.6l-4.8-0.8
				l-7-5.6l-1.7-4.1l0.8-3.2l2.1-6.1l0.5-2.9l-1.9-1l-6.9-0.8l-1-1.7l-0.1-4.2l-5.5-3.4l-7-7.8l-2.3-7.3l-0.2-4.2L558.4,248.1z"/>

			<path id="WI" sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" class="st0" d="
				M615.1,197.4l-0.1-3.2l-1.2-4.5l-0.6-6.1l-1.1-2.4l1-3.1l0.8-2.9l1.5-2.6l-0.6-3.4l-0.6-3.6l0.5-1.8l1.9-2.4l0.2-2.7l-0.8-1.3
				l0.6-2.6l-0.5-4.2l2.7-5.7l2.9-6.8l0.2-2.3l-0.3-1l-0.8,0.5l-4.2,6.3l-2.7,4l-1.9,1.8l-0.8,2.3l-2,0.8l-1.1,1.9l-1.5-0.3l-0.2-1.8
				l1.3-2.4l2.1-4.7l1.8-1.6l1-2.4l-2.6-1.9l-2-10.4l-3.5-1.3l-1.9-2.3l-12.1-2.7l-2.9-1l-8.2-2.2l-7.9-1.2l-3.8-5.1l-0.8,0.6l-1.2-0.2
				l-0.6-1.1l-1.3,0.3l-1.1,0.2l-1.8,1l-1-0.6l0.6-1.9l1.9-3.1l1.1-1.1l-1.9-1.5l-2.1,0.8l-2.9,1.9l-7.4,3.2l-2.9,0.6l-2.9-0.5l-1-0.9
				l-2.1,2.8l-0.2,2.7v8.5l-1.1,1.6l-5.3,3.9l-2.3,5.9l0.5,0.2l2.5,2.1l0.7,3.2l-1.8,3.2v3.9l0.5,6.6l3,3h3.4l1.8,3.2l3.4,0.5l3.9,5.7
				l7.1,4.1l2.1,2.7l0.9,7.4l0.7,3.3l2.3,1.6l0.2,1.4l-2.1,3.4l0.2,3.2l2.5,3.9l2.5,1.1l3,0.5l1.3,1.4L615.1,197.4z"/>



		
		
		
		
		
		
		
		
		<text transform="matrix(1.0174 0 0 1 442.2192 357.9113)" class="st1 st2 st3">OK</text>
		<text transform="matrix(1.0174 0 0 1 410.106 430.6222)" class="st1 st2 st3">TX</text>
		<text transform="matrix(1.0174 0 0 1 288.7275 362.757)" class="st1 st2 st3">NM</text>
		<text transform="matrix(1.0174 0 0 1 428.6255 290.0455)" class="st1 st2 st3">KS</text>
		<text transform="matrix(1.0174 0 0 1 403.9653 227.0231)" class="st1 st2 st3">NE</text>
		<text transform="matrix(1.0174 0 0 1 397.061 164.0035)" class="st1 st2 st3">SD</text>
		<text transform="matrix(1.0174 0 0 1 399.4214 101.9391)" class="st1 st2 st3">ND</text>
		<text transform="matrix(1.0174 0 0 1 283.1914 183.3854)" class="st1 st2 st3">WY</text>
		<text transform="matrix(1.0174 0 0 1 265.2739 100.982)" class="st1 st2 st3">MT</text>
		<text transform="matrix(1.0174 0 0 1 304.1221 275.4928)" class="st1 st2 st3">CO</text>
		<text transform="matrix(1.0174 0 0 1 210.2524 260.9576)" class="st1 st2 



	</div>

</body>
</html>

以上是我想要关注的代码和现场演示.

Above is the code and Live demo of what i am trying to focus.

我已经设置了区域的悬停背景颜色.请悬停,你会知道我想要关注什么.

I have set the hover bg color of regions. Please hover, you will know what i am trying to focus.

但是每当我将鼠标指针移动到状态名称的文本时,悬停背景颜色就像区域悬停一样工作,它不会.

But whenever i move mouse pointer to text of state names, the hover bg color which was to work like region hover, it doesn't.

此错误仅适用于州名称文本.

This error is only for states name text.

它是一个 SVG 地图.

Its an SVG MAP.

推荐答案

自解释:

.st1 { pointer-events: none; }

这应该可以完成工作.

这篇关于将鼠标悬停在文本 SVG MAP 上时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:将鼠标悬停在文本 SVG MAP 上时出错

基础教程推荐