奇怪的SVG悬停行为

时间:2016-04-19 20:47:50

标签: javascript html css svg

我正在制作代表下奥地利不同地区的svg地图。 问题是,组部分上的:悬停事件大部分时间都没有反应。

<svg height="401" id="noe" viewbox="4 436 413 401" width="413">
<style>
    .district path {
        fill: none;
        stroke: #6e6e6e;
        stroke-width:0.5;
    }

    .district:hover path {
        fill: #3498db;
    }

    .outline path {
        fill: none;
        stroke: #6e6e6e;
        stroke-width:1;
    } 
</style>

<g class="district" district:id="ks">
    <path d=
    "M 192.72,581.02 L 191.52,582.46 L 192.48,587.74 L 197.04,589.42 L 197.52,593.26 L 205.2,595.659 L 204.48,597.099 L 199.2,598.059 L 196.32,598.299 L 194.64,596.619 L 190.56,598.059 L 192.24,596.139 L 190.56,595.419 L 191.28,590.38 L 186.96,591.1 L 180,593.74 L 179.76,589.9 L 175.921,589.66 L 174.721,588.22 L 175.681,587.02 L 175.201,583.42 L 182.401,584.14 L 185.041,581.98 L 188.16,582.94 L 190.32,580.3 L 192.72,579.82 L 192.72,581.02">

    </path>
</g>

<g class="district" district:id="p">
    <path d=
    "M 206.88,621.35 L 207.36,623.27 L 206.16,623.99 L 207.12,631.67 L 205.44,634.07 L 201.6,635.03 L 201.36,636.95 L 198,636.71 L 197.52,640.79 L 193.92,643.909 L 195.6,647.269 L 195.12,653.989 L 185.521,652.789 L 184.561,649.189 L 186.72,648.229 L 186.24,644.39 L 181.441,644.39 L 180.961,640.79 L 183.841,638.87 L 183.601,634.07 L 184.081,630.23 L 187.2,629.51 L 189.84,628.07 L 192.96,625.91 L 196.56,626.87 L 197.52,622.551 L 201.6,622.311 L 203.28,620.871 L 206.88,621.351">

    </path>
</g>

<g class="district" district:id="wy">
    <path d=
    "M 86.3999,690 L 81.3601,689.28 L 72.7202,691.68 L 71.2803,696.48 L 73.6802,703.92 L 71.5203,704.88 L 71.7603,707.28 L 63.8403,711.839 L 57.3604,699.359 L 53.5205,701.519 L 48.7207,699.599 L 45.3608,697.919 L 47.5208,697.679 L 48.2407,693.12 L 46.8008,691.44 L 51.3606,689.52 L 51.1206,686.88 L 54.0005,684.48 L 58.3203,686.4 L 60.7202,689.52 L 60.7202,688.08 L 69.6001,686.16 L 73.9199,681.6 L 76.7998,681.84 L 76.5598,679.44 L 77.0398,679.2 L 79.6797,682.32 L 83.2795,681.84 L 80.1597,684.96 L 84.4795,687.6 L 88.0793,687.84 L 86.3994,690">

    </path>
</g>

<g class="district" district:id="wn">
    <path d=
    "M 291.61,711.12 L 293.29,714.24 L 290.89,716.64 L 293.53,718.08 L 294.01,720.72 L 291.61,725.28 L 288.01,725.04 L 287.53,729.359 L 285.13,728.879 L 283.93,734.399 L 280.81,734.879 L 279.37,732.959 L 277.69,735.599 L 274.811,735.839 L 273.371,733.919 L 278.17,729.599 L 278.89,730.319 L 279.37,728.879 L 279.61,722.159 L 281.53,717.84 L 279.13,715.92 L 279.61,713.28 L 282.25,710.64 L 281.29,708.48 L 283.93,706.8 L 284.17,706.8 L 283.93,713.04 L 291.37,713.28 L 291.61,711.12">

    </path>
</g>

<g class="district" district:id="wu">
    <path d=
    "M 325.21,641.03 L 334.81,646.07 L 335.05,643.91 L 344.41,646.55 L 345.85,647.51 L 345.13,652.31 L 349.449,655.189 L 343.69,655.669 L 340.81,654.229 L 339.37,657.349 L 335.05,663.589 L 332.65,664.309 L 326.89,667.429 L 325.69,670.789 L 325.21,671.269 L 323.771,672.469 L 320.171,676.789 L 318.491,679.909 L 311.291,677.029 L 311.051,677.029 L 310.571,676.069 L 311.771,666.469 L 309.611,665.509 L 309.131,659.509 L 311.291,657.349 L 309.131,656.389 L 304.811,655.429 L 306.731,649.429 L 310.331,650.869 L 314.171,650.389 L 313.931,646.309 L 316.571,645.829 L 319.93,641.75 L 325.21,641.03 M 325.45,602.87 L 322.33,611.51 L 319.21,611.03 L 319.69,614.15 L 318.49,615.11 L 312.97,611.51 L 312.49,606.23 L 310.811,605.27 L 308.651,602.87 L 315.371,602.63 L 316.091,598.791 L 319.21,598.071 L 321.37,599.75 L 323.53,601.67 L 325.45,602.87 M 296.89,604.31 L 301.45,614.15 L 300.49,613.91 L 299.29,612.47 L 294.49,616.31 L 290.89,617.03 L 290.17,620.15 L 287.05,620.87 L 286.09,624.469 L 283.69,624.949 L 283.69,622.55 L 278.411,619.19 L 276.731,622.55 L 277.211,626.869 L 275.291,628.549 L 277.211,628.549 L 278.891,633.109 L 275.291,640.309 L 271.451,641.029 L 270.491,644.149 L 265.211,649.669 L 262.331,647.269 L 260.171,650.149 L 256.812,649.669 L 255.612,648.469 L 248.652,648.469 L 247.452,647.029 L 245.772,645.109 L 249.852,638.869 L 246.972,638.629 L 246.012,636.229 L 246.012,635.749 L 247.932,633.829 L 249.612,635.749 L 254.171,633.109 L 249.612,631.189 L 249.372,629.509 L 253.691,630.229 L 255.371,627.349 L 258.011,626.149 L 257.051,623.51 L 259.931,624.469 L 259.211,622.07 L 261.371,623.03 L 260.891,624.709 L 265.451,624.469 L 264.491,621.35 L 266.891,621.11 L 268.331,620.39 L 268.331,616.79 L 271.691,619.19 L 270.971,615.83 L 273.611,615.35 L 277.45,618.47 L 280.09,617.03 L 280.09,612.95 L 283.21,610.07 L 280.81,609.11 L 282.25,607.91 L 281.53,604.79 L 286.33,606.23 L 285.85,598.55 L 288.49,597.83 L 289.69,598.07 L 296.89,604.31">

    </path>
</g>

<g class="district" district:id="w">
    <path d=
    "M 306,605.03 L 307.2,606.23 L 310.8,605.27 L 312.48,606.23 L 312.96,611.51 L 318.479,615.11 L 319.679,614.15 L 319.199,611.03 L 322.319,611.51 L 324.239,612.47 L 323.279,615.35 L 325.919,617.51 L 329.279,617.51 L 328.319,622.069 L 330.479,622.789 L 328.559,637.429 L 330.239,636.709 L 330.959,640.069 L 334.559,640.069 L 335.039,643.909 L 334.799,646.069 L 325.199,641.029 L 319.919,641.749 L 316.559,645.829 L 313.919,646.309 L 314.159,650.389 L 310.32,650.869 L 306.72,649.429 L 303.36,648.949 L 297.12,646.789 L 295.44,651.109 L 293.28,649.909 L 288.72,648.229 L 281.28,650.629 L 281.04,649.669 L 284.16,648.709 L 279.6,645.349 L 281.52,644.149 L 277.92,643.909 L 275.281,640.309 L 278.88,633.109 L 277.2,628.549 L 275.281,628.549 L 277.2,626.869 L 276.72,622.55 L 278.4,619.19 L 283.68,622.55 L 283.68,624.949 L 286.08,624.469 L 287.04,620.87 L 290.16,620.15 L 290.88,617.03 L 294.48,616.31 L 299.28,612.47 L 300.479,613.91 L 301.439,614.15 L 303.839,612.71 L 304.079,606.47 L 305.999,605.03">

    </path>
</g>

<g class="district" district:id="am">
    <path d=
    "M 81.3599,689.28 L 86.3997,690 L 90.9595,690 L 89.7595,693.12 L 91.6794,694.08 L 89.9995,700.32 L 91.1995,701.28 L 92.1594,699.84 L 97.6792,699.36 L 100.079,703.2 L 94.0791,706.08 L 93.5991,708.959 L 89.7593,713.759 L 88.5593,714.719 L 90.9592,718.799 L 84.9592,723.119 L 84.4792,725.759 L 81.5994,727.679 L 82.7993,728.639 L 75.5994,731.519 L 77.2793,735.598 L 80.1592,736.798 L 76.3193,740.638 L 77.7593,742.798 L 75.1194,744.478 L 73.9194,742.078 L 71.7595,742.078 L 64.0796,746.158 L 59.5198,741.358 L 60.7197,739.918 L 57.3599,737.278 L 55.4399,731.999 L 58.3198,729.839 L 54.96,725.519 L 57.3599,720.479 L 54.96,718.559 L 62.8799,713.519 L 63.8398,711.839 L 71.7598,707.28 L 71.5198,704.88 L 73.6797,703.92 L 71.2798,696.48 L 72.7197,691.68 L 81.3596,689.28 M 43.6799,645.35 L 50.3999,649.43 L 53.0398,648.23 L 54.4797,644.63 L 58.0796,646.07 L 61.4395,644.63 L 62.3994,644.39 L 72.9592,640.79 L 75.5991,636.71 L 75.5991,633.831 L 79.9189,631.911 L 81.1189,633.111 L 87.8389,632.391 L 90.9587,637.67 L 93.3586,639.35 L 94.0786,639.59 L 95.9985,640.07 L 94.3186,640.07 L 93.8386,642.47 L 90.9587,642.47 L 92.8787,645.59 L 92.8787,648.47 L 91.9187,649.67 L 93.8386,651.83 L 94.7986,659.03 L 99.8384,657.59 L 97.9185,667.91 L 95.5186,667.67 L 92.6387,669.35 L 93.8386,674.629 L 86.8787,675.589 L 82.7988,677.029 L 82.5588,679.909 L 80.3989,677.989 L 77.0391,679.189 L 76.5591,679.429 L 76.7991,681.829 L 73.9192,681.589 L 69.5994,686.149 L 60.7195,688.069 L 60.7195,689.509 L 58.3196,686.389 L 53.9998,684.469 L 51.1199,686.869 L 51.3599,689.509 L 46.8,691.429 L 48.24,693.109 L 47.52,697.668 L 45.3601,697.908 L 40.3203,696.708 L 30.9604,689.749 L 21.6006,685.909 L 21.3606,683.029 L 15.8408,675.589 L 16.3208,668.869 L 15.6008,667.429 L 17.7607,665.989 L 16.0808,665.509 L 19.2007,661.909 L 21.1206,660.709 L 17.2808,657.829 L 18.9607,654.949 L 17.2808,651.59 L 19.4407,646.79 L 19.4407,645.11 L 18.9607,640.07 L 20.4006,635.03 L 24.2405,632.39 L 24.9604,631.91 L 30.9604,633.11 L 35.0403,635.27 L 40.5601,642.23 L 43.6799,645.35">

    </path>
</g>

<g class="district" district:id="bn">
    <path d=
    "M 254.88,657.59 L 255.84,660.95 L 257.52,659.27 L 260.4,659.27 L 261.36,662.87 L 263.04,662.63 L 264.479,665.27 L 265.919,662.39 L 269.279,661.67 L 272.879,664.31 L 273.119,668.15 L 282.719,672.469 L 286.559,669.35 L 288.959,670.55 L 292.079,671.51 L 294.479,668.15 L 302.638,672.709 L 302.398,673.909 L 307.678,676.789 L 310.558,676.069 L 311.038,677.029 L 311.278,677.029 L 318.478,679.909 L 320.158,676.789 L 323.758,672.469 L 325.198,671.27 L 333.838,677.99 L 332.638,682.069 L 331.198,684.229 L 329.998,687.829 L 328.078,689.509 L 317.998,691.909 L 314.398,695.509 L 313.918,699.349 L 311.998,701.749 L 312.958,701.989 L 312.478,704.148 L 310.798,705.348 L 308.878,704.148 L 307.198,699.349 L 304.319,703.428 L 294.239,698.149 L 286.799,698.389 L 285.359,696.949 L 283.439,697.669 L 282.959,701.509 L 280.799,699.829 L 279.119,699.589 L 272.639,705.108 L 266.879,704.628 L 268.559,706.788 L 266.879,707.028 L 263.28,705.108 L 262.8,702.229 L 264.24,701.269 L 251.76,703.668 L 251.04,701.269 L 253.199,695.749 L 252.24,694.789 L 249.36,696.949 L 247.92,695.989 L 249.36,692.629 L 241.92,696.469 L 241.2,691.909 L 230.16,689.269 L 229.44,681.109 L 230.64,680.149 L 236.88,681.589 L 241.2,680.389 L 239.04,677.509 L 241.2,674.629 L 239.04,674.149 L 239.04,669.59 L 236.4,667.67 L 234.24,669.11 L 231.12,668.15 L 229.92,663.35 L 235.92,660.23 L 235.2,656.15 L 237.84,655.91 L 247.44,647.03 L 248.64,648.47 L 255.6,648.47 L 256.8,649.67 L 254.4,651.83 L 254.4,654.71 L 256.08,655.43 L 254.88,657.59">

    </path>
</g>

<g class="district" district:id="bl">
    <path d=
    "M 390.97,634.31 L 392.65,635.99 L 394.81,635.03 L 398.41,637.91 L 403.929,641.99 L 407.289,640.79 L 409.209,645.11 L 408.249,645.59 L 408.969,646.55 L 408.729,648.469 L 405.369,650.389 L 404.649,654.469 L 400.33,653.029 L 403.449,650.869 L 402.01,649.669 L 399.85,651.349 L 398.65,648.949 L 396.97,648.469 L 394.81,651.109 L 399.13,654.709 L 401.77,656.869 L 398.65,663.349 L 397.45,667.909 L 395.29,667.909 L 395.29,664.789 L 386.89,661.429 L 387.37,659.749 L 384.97,658.309 L 381.13,658.549 L 380.17,658.309 L 374.17,665.509 L 375.37,667.429 L 373.93,668.389 L 373.45,668.389 L 369.61,668.389 L 362.89,672.709 L 354.97,672.949 L 355.45,681.589 L 354.97,683.509 L 349.931,685.669 L 348.971,684.709 L 346.331,688.069 L 345.131,690.948 L 345.131,691.188 L 341.771,695.988 L 340.091,697.908 L 337.931,701.508 L 336.971,702.228 L 331.691,694.788 L 328.092,689.508 L 330.011,687.828 L 331.211,684.229 L 332.651,682.069 L 333.851,677.989 L 325.211,671.269 L 325.691,670.789 L 326.891,667.429 L 332.651,664.309 L 335.051,663.589 L 339.371,657.349 L 340.811,654.229 L 343.691,655.669 L 349.45,655.189 L 345.131,652.309 L 345.851,647.51 L 346.811,649.429 L 348.97,648.469 L 352.57,649.189 L 360.25,645.83 L 361.69,647.27 L 362.17,648.229 L 367.21,649.189 L 371.05,647.03 L 372.49,647.99 L 376.33,646.55 L 375.85,642.95 L 379.209,641.03 L 380.169,642.95 L 381.849,641.51 L 383.769,642.47 L 388.089,638.63 L 388.569,634.55 L 390.969,634.31">

    </path>

    <g>
    </g>
</g>

<g class="district" district:id="gf">
    <path d=
    "M 382.33,530.38 L 381.37,534.22 L 384.49,534.94 L 384.01,538.54 L 385.21,546.94 L 387.61,551.5 L 385.93,556.779 L 382.81,557.979 L 381.85,559.419 L 382.57,562.539 L 379.45,562.539 L 378.73,566.859 L 377.29,567.099 L 372.97,573.579 L 373.21,575.979 L 375.37,580.059 L 373.45,582.458 L 373.69,588.458 L 371.05,588.938 L 372.73,593.738 L 373.21,595.898 L 377.53,596.138 L 377.29,598.298 L 383.05,600.938 L 381.13,604.058 L 382.09,607.178 L 385.45,612.938 L 390.729,614.617 L 389.53,620.377 L 392.169,624.937 L 394.809,635.017 L 392.649,635.977 L 390.969,634.297 L 388.57,634.537 L 388.09,638.617 L 383.77,642.457 L 381.85,641.497 L 380.17,642.937 L 379.21,641.017 L 375.85,642.937 L 376.33,646.536 L 372.49,647.976 L 371.05,647.016 L 367.21,649.176 L 362.171,648.216 L 361.691,647.256 L 360.251,645.816 L 352.571,649.176 L 348.971,648.456 L 346.811,649.416 L 345.851,647.496 L 344.411,646.536 L 335.051,643.896 L 334.571,640.057 L 330.971,640.057 L 330.251,636.697 L 328.572,637.417 L 330.491,622.777 L 328.332,622.057 L 329.292,617.497 L 325.932,617.497 L 323.292,615.337 L 324.252,612.457 L 322.332,611.497 L 325.452,602.857 L 328.572,603.337 L 329.052,601.897 L 332.411,603.097 L 337.211,605.497 L 344.171,602.137 L 345.851,599.738 L 342.011,598.298 L 342.731,596.138 L 336.011,590.858 L 335.531,588.458 L 331.691,582.938 L 332.891,581.738 L 332.411,580.058 L 329.531,580.058 L 327.372,571.898 L 334.332,570.219 L 336.251,571.658 L 337.451,569.499 L 341.051,571.418 L 343.691,567.819 L 339.851,565.899 L 340.091,564.459 L 344.651,558.219 L 346.091,557.499 L 349.931,556.299 L 346.331,549.579 L 346.331,546.939 L 349.451,543.579 L 348.731,537.819 L 345.371,534.219 L 345.371,533.74 L 350.171,535.899 L 349.931,537.099 L 352.811,539.019 L 354.011,538.299 L 353.531,534.459 L 357.851,534.459 L 360.49,532.3 L 361.21,533.02 L 363.13,533.74 L 365.53,536.379 L 372.25,537.579 L 370.57,534.219 L 372.49,531.82 L 379.45,533.5 L 380.65,529.18 L 382.33,530.38">

    </path>
</g>

<g class="district" district:id="gd">
    <path d=
    "M 96.24,454.05 L 99.3599,455.97 L 102.96,455.25 L 102.96,458.61 L 108.96,459.33 L 112.8,458.37 L 116.399,459.81 L 115.679,462.45 L 118.559,466.77 L 117.359,471.329 L 117.119,471.569 L 121.439,475.649 L 120.479,483.569 L 121.679,485.249 L 119.759,484.769 L 118.079,487.169 L 119.519,490.289 L 117.599,490.529 L 115.679,494.609 L 119.519,499.888 L 117.599,503.968 L 116.159,503.248 L 113.76,505.408 L 114.24,509.728 L 111.84,512.608 L 116.159,515.008 L 116.159,517.408 L 115.919,520.048 L 118.079,520.768 L 116.879,524.607 L 115.679,528.447 L 112.8,522.927 L 109.68,523.647 L 111.6,528.447 L 106.56,525.807 L 104.64,527.247 L 102.72,525.567 L 93.6001,525.327 L 94.0801,527.487 L 91.4402,527.007 L 93.1201,529.887 L 91.4402,532.047 L 97.6802,537.567 L 95.0403,542.847 L 93.3604,541.167 L 90.9604,543.567 L 88.0806,541.887 L 85.6807,546.927 L 80.8809,544.287 L 78.001,543.807 L 75.6011,545.487 L 73.4412,548.846 L 70.5613,548.126 L 69.8413,550.766 L 67.2014,549.326 L 63.6016,551.726 L 67.2014,559.886 L 63.3616,558.446 L 61.4417,559.406 L 59.2817,557.726 L 56.1619,560.366 L 52.562,554.606 L 49.2021,553.406 L 51.3621,553.167 L 53.762,549.087 L 52.562,545.727 L 53.762,540.927 L 52.082,538.527 L 53.762,532.527 L 55.4419,527.487 L 66.0017,519.327 L 64.8018,516.208 L 66.4817,512.368 L 65.7617,509.248 L 68.8816,508.768 L 76.8015,508.768 L 77.7615,510.928 L 87.8413,513.328 L 89.0413,512.128 L 91.4412,509.488 L 87.3613,506.368 L 89.7612,498.448 L 90.0012,494.368 L 91.9211,494.368 L 90.0012,487.168 L 91.4412,487.168 L 92.1611,482.368 L 90.0012,465.089 L 93.1211,460.529 L 93.3611,457.889 L 91.9211,456.449 L 96.241,454.049">

    </path>
</g>

<g class="district" district:id="hl">
    <path d=
    "M 219.13,483.33 L 220.57,485.49 L 218.89,486.93 L 222.25,488.61 L 224.41,486.93 L 225.37,490.77 L 227.05,489.09 L 228.49,491.01 L 226.81,490.53 L 227.05,492.45 L 232.089,492.21 L 231.609,494.61 L 233.289,495.57 L 234.489,493.65 L 236.649,494.61 L 235.449,498.689 L 238.569,500.849 L 242.409,504.449 L 252.969,509.489 L 256.569,510.929 L 258.729,511.409 L 265.688,511.649 L 266.648,510.449 L 276.728,512.129 L 275.528,513.089 L 277.448,515.729 L 277.208,519.809 L 275.048,520.529 L 276.248,521.489 L 273.848,529.648 L 274.328,532.768 L 278.888,530.608 L 282.488,531.088 L 283.208,533.488 L 281.768,533.968 L 284.648,542.608 L 289.688,540.928 L 289.688,544.288 L 287.768,545.248 L 288.008,550.768 L 287.288,553.408 L 284.408,549.568 L 279.368,550.048 L 277.928,555.088 L 273.608,557.008 L 272.168,561.567 L 273.848,563.487 L 273.608,567.567 L 270.969,572.607 L 268.809,570.927 L 267.129,573.807 L 264.489,574.767 L 261.129,572.127 L 260.169,574.527 L 255.849,572.607 L 256.089,568.047 L 249.369,569.007 L 248.889,568.047 L 243.369,567.087 L 241.929,569.727 L 235.689,570.687 L 234.969,572.367 L 233.53,571.647 L 232.09,572.607 L 231.37,569.007 L 228.73,568.767 L 223.93,569.007 L 223.45,571.887 L 221.53,570.687 L 217.69,569.007 L 216.25,571.167 L 213.13,571.407 L 205.45,562.527 L 205.45,559.647 L 209.53,558.927 L 206.17,551.967 L 214.81,548.367 L 217.93,548.847 L 216.97,545.488 L 220.81,544.768 L 226.57,544.528 L 230.89,545.488 L 230.89,533.248 L 235.209,529.888 L 234.729,528.688 L 229.21,527.728 L 218.89,526.048 L 216.25,524.848 L 216.25,521.728 L 213.85,521.728 L 217.45,519.328 L 216.97,517.408 L 214.81,516.928 L 215.77,515.008 L 222.73,511.888 L 223.21,508.049 L 226.09,507.569 L 225.13,504.449 L 226.33,503.489 L 223.45,501.809 L 217.69,502.289 L 218.41,501.329 L 216.01,500.369 L 216.73,497.969 L 214.09,497.489 L 213.85,494.849 L 206.89,495.329 L 203.051,494.369 L 205.93,489.089 L 209.77,483.81 L 216.97,484.53 L 219.13,483.33">

    </path>
</g>

<g class="district" district:id="ho">
    <path d=
    "M 191.04,482.85 L 196.8,488.61 L 199.439,487.41 L 205.919,489.09 L 203.04,494.37 L 206.879,495.33 L 213.839,494.85 L 214.079,497.49 L 216.719,497.969 L 215.999,500.369 L 218.399,501.329 L 217.679,502.289 L 223.439,501.809 L 226.319,503.489 L 225.119,504.449 L 226.079,507.569 L 223.199,508.049 L 222.719,511.889 L 215.759,515.009 L 214.799,516.929 L 216.959,517.409 L 217.439,519.329 L 213.839,521.729 L 216.239,521.729 L 216.239,524.848 L 218.879,526.048 L 229.199,527.728 L 234.719,528.688 L 235.198,529.888 L 230.879,533.248 L 230.879,545.488 L 226.559,544.528 L 220.799,544.768 L 216.959,545.488 L 217.919,548.848 L 214.799,548.368 L 206.159,551.968 L 206.879,550.048 L 204.719,549.808 L 201.12,550.288 L 200.88,552.688 L 199.2,553.408 L 194.4,554.128 L 189.6,551.488 L 188.88,555.088 L 185.28,551.968 L 185.04,545.488 L 181.2,544.288 L 182.16,541.648 L 173.76,540.208 L 175.68,537.808 L 173.041,536.848 L 167.521,535.168 L 165.601,537.568 L 161.281,535.888 L 158.161,531.808 L 158.881,530.608 L 161.281,531.088 L 162.721,528.928 L 158.881,524.609 L 159.601,520.049 L 161.761,518.129 L 166.081,518.609 L 168.241,515.969 L 168.961,510.929 L 172.801,510.689 L 168.961,507.569 L 171.841,505.169 L 170.881,503.25 L 172.561,500.13 L 170.641,498.21 L 173.76,497.01 L 173.521,495.81 L 178.32,495.09 L 179.76,492.93 L 184.08,491.97 L 183.36,489.09 L 179.76,486.45 L 180.24,484.53 L 184.56,484.53 L 180.48,482.37 L 180.96,479.97 L 184.8,479.49 L 187.44,482.37 L 191.04,482.85">

    </path>
</g>
</svg>

演示:http://codepen.io/internetztube/pen/ZWRKgO

2 个答案:

答案 0 :(得分:1)

默认情况下,形状仅对绘制它们的事件做出反应,而形状只有轮廓。一旦你盘旋在一条线上,形状就会填满,然后当你徘徊在之后绘制的东西上时,形状会保持填充状态。

pointer-events属性可以改变它的工作方式,所以你可能想在路径上设置pointer-events: visible;,就像这样......

&#13;
&#13;
<svg height="401" id="noe" viewbox="4 436 413 401" width="413">
<style>
    .district path {
        fill: none;
        stroke: #6e6e6e;
        stroke-width:0.5;
        pointer-events: visible;
    }

    .district:hover path {
        fill: #3498db;
    }

    .outline path {
        fill: none;
        stroke: #6e6e6e;
        stroke-width:1;
    } 
</style>

<g class="district" district:id="ks">
    <path d=
    "M 192.72,581.02 L 191.52,582.46 L 192.48,587.74 L 197.04,589.42 L 197.52,593.26 L 205.2,595.659 L 204.48,597.099 L 199.2,598.059 L 196.32,598.299 L 194.64,596.619 L 190.56,598.059 L 192.24,596.139 L 190.56,595.419 L 191.28,590.38 L 186.96,591.1 L 180,593.74 L 179.76,589.9 L 175.921,589.66 L 174.721,588.22 L 175.681,587.02 L 175.201,583.42 L 182.401,584.14 L 185.041,581.98 L 188.16,582.94 L 190.32,580.3 L 192.72,579.82 L 192.72,581.02">

    </path>
</g>

<g class="district" district:id="p">
    <path d=
    "M 206.88,621.35 L 207.36,623.27 L 206.16,623.99 L 207.12,631.67 L 205.44,634.07 L 201.6,635.03 L 201.36,636.95 L 198,636.71 L 197.52,640.79 L 193.92,643.909 L 195.6,647.269 L 195.12,653.989 L 185.521,652.789 L 184.561,649.189 L 186.72,648.229 L 186.24,644.39 L 181.441,644.39 L 180.961,640.79 L 183.841,638.87 L 183.601,634.07 L 184.081,630.23 L 187.2,629.51 L 189.84,628.07 L 192.96,625.91 L 196.56,626.87 L 197.52,622.551 L 201.6,622.311 L 203.28,620.871 L 206.88,621.351">

    </path>
</g>

<g class="district" district:id="wy">
    <path d=
    "M 86.3999,690 L 81.3601,689.28 L 72.7202,691.68 L 71.2803,696.48 L 73.6802,703.92 L 71.5203,704.88 L 71.7603,707.28 L 63.8403,711.839 L 57.3604,699.359 L 53.5205,701.519 L 48.7207,699.599 L 45.3608,697.919 L 47.5208,697.679 L 48.2407,693.12 L 46.8008,691.44 L 51.3606,689.52 L 51.1206,686.88 L 54.0005,684.48 L 58.3203,686.4 L 60.7202,689.52 L 60.7202,688.08 L 69.6001,686.16 L 73.9199,681.6 L 76.7998,681.84 L 76.5598,679.44 L 77.0398,679.2 L 79.6797,682.32 L 83.2795,681.84 L 80.1597,684.96 L 84.4795,687.6 L 88.0793,687.84 L 86.3994,690">

    </path>
</g>

<g class="district" district:id="wn">
    <path d=
    "M 291.61,711.12 L 293.29,714.24 L 290.89,716.64 L 293.53,718.08 L 294.01,720.72 L 291.61,725.28 L 288.01,725.04 L 287.53,729.359 L 285.13,728.879 L 283.93,734.399 L 280.81,734.879 L 279.37,732.959 L 277.69,735.599 L 274.811,735.839 L 273.371,733.919 L 278.17,729.599 L 278.89,730.319 L 279.37,728.879 L 279.61,722.159 L 281.53,717.84 L 279.13,715.92 L 279.61,713.28 L 282.25,710.64 L 281.29,708.48 L 283.93,706.8 L 284.17,706.8 L 283.93,713.04 L 291.37,713.28 L 291.61,711.12">

    </path>
</g>

<g class="district" district:id="wu">
    <path d=
    "M 325.21,641.03 L 334.81,646.07 L 335.05,643.91 L 344.41,646.55 L 345.85,647.51 L 345.13,652.31 L 349.449,655.189 L 343.69,655.669 L 340.81,654.229 L 339.37,657.349 L 335.05,663.589 L 332.65,664.309 L 326.89,667.429 L 325.69,670.789 L 325.21,671.269 L 323.771,672.469 L 320.171,676.789 L 318.491,679.909 L 311.291,677.029 L 311.051,677.029 L 310.571,676.069 L 311.771,666.469 L 309.611,665.509 L 309.131,659.509 L 311.291,657.349 L 309.131,656.389 L 304.811,655.429 L 306.731,649.429 L 310.331,650.869 L 314.171,650.389 L 313.931,646.309 L 316.571,645.829 L 319.93,641.75 L 325.21,641.03 M 325.45,602.87 L 322.33,611.51 L 319.21,611.03 L 319.69,614.15 L 318.49,615.11 L 312.97,611.51 L 312.49,606.23 L 310.811,605.27 L 308.651,602.87 L 315.371,602.63 L 316.091,598.791 L 319.21,598.071 L 321.37,599.75 L 323.53,601.67 L 325.45,602.87 M 296.89,604.31 L 301.45,614.15 L 300.49,613.91 L 299.29,612.47 L 294.49,616.31 L 290.89,617.03 L 290.17,620.15 L 287.05,620.87 L 286.09,624.469 L 283.69,624.949 L 283.69,622.55 L 278.411,619.19 L 276.731,622.55 L 277.211,626.869 L 275.291,628.549 L 277.211,628.549 L 278.891,633.109 L 275.291,640.309 L 271.451,641.029 L 270.491,644.149 L 265.211,649.669 L 262.331,647.269 L 260.171,650.149 L 256.812,649.669 L 255.612,648.469 L 248.652,648.469 L 247.452,647.029 L 245.772,645.109 L 249.852,638.869 L 246.972,638.629 L 246.012,636.229 L 246.012,635.749 L 247.932,633.829 L 249.612,635.749 L 254.171,633.109 L 249.612,631.189 L 249.372,629.509 L 253.691,630.229 L 255.371,627.349 L 258.011,626.149 L 257.051,623.51 L 259.931,624.469 L 259.211,622.07 L 261.371,623.03 L 260.891,624.709 L 265.451,624.469 L 264.491,621.35 L 266.891,621.11 L 268.331,620.39 L 268.331,616.79 L 271.691,619.19 L 270.971,615.83 L 273.611,615.35 L 277.45,618.47 L 280.09,617.03 L 280.09,612.95 L 283.21,610.07 L 280.81,609.11 L 282.25,607.91 L 281.53,604.79 L 286.33,606.23 L 285.85,598.55 L 288.49,597.83 L 289.69,598.07 L 296.89,604.31">

    </path>
</g>

<g class="district" district:id="w">
    <path d=
    "M 306,605.03 L 307.2,606.23 L 310.8,605.27 L 312.48,606.23 L 312.96,611.51 L 318.479,615.11 L 319.679,614.15 L 319.199,611.03 L 322.319,611.51 L 324.239,612.47 L 323.279,615.35 L 325.919,617.51 L 329.279,617.51 L 328.319,622.069 L 330.479,622.789 L 328.559,637.429 L 330.239,636.709 L 330.959,640.069 L 334.559,640.069 L 335.039,643.909 L 334.799,646.069 L 325.199,641.029 L 319.919,641.749 L 316.559,645.829 L 313.919,646.309 L 314.159,650.389 L 310.32,650.869 L 306.72,649.429 L 303.36,648.949 L 297.12,646.789 L 295.44,651.109 L 293.28,649.909 L 288.72,648.229 L 281.28,650.629 L 281.04,649.669 L 284.16,648.709 L 279.6,645.349 L 281.52,644.149 L 277.92,643.909 L 275.281,640.309 L 278.88,633.109 L 277.2,628.549 L 275.281,628.549 L 277.2,626.869 L 276.72,622.55 L 278.4,619.19 L 283.68,622.55 L 283.68,624.949 L 286.08,624.469 L 287.04,620.87 L 290.16,620.15 L 290.88,617.03 L 294.48,616.31 L 299.28,612.47 L 300.479,613.91 L 301.439,614.15 L 303.839,612.71 L 304.079,606.47 L 305.999,605.03">

    </path>
</g>

<g class="district" district:id="am">
    <path d=
    "M 81.3599,689.28 L 86.3997,690 L 90.9595,690 L 89.7595,693.12 L 91.6794,694.08 L 89.9995,700.32 L 91.1995,701.28 L 92.1594,699.84 L 97.6792,699.36 L 100.079,703.2 L 94.0791,706.08 L 93.5991,708.959 L 89.7593,713.759 L 88.5593,714.719 L 90.9592,718.799 L 84.9592,723.119 L 84.4792,725.759 L 81.5994,727.679 L 82.7993,728.639 L 75.5994,731.519 L 77.2793,735.598 L 80.1592,736.798 L 76.3193,740.638 L 77.7593,742.798 L 75.1194,744.478 L 73.9194,742.078 L 71.7595,742.078 L 64.0796,746.158 L 59.5198,741.358 L 60.7197,739.918 L 57.3599,737.278 L 55.4399,731.999 L 58.3198,729.839 L 54.96,725.519 L 57.3599,720.479 L 54.96,718.559 L 62.8799,713.519 L 63.8398,711.839 L 71.7598,707.28 L 71.5198,704.88 L 73.6797,703.92 L 71.2798,696.48 L 72.7197,691.68 L 81.3596,689.28 M 43.6799,645.35 L 50.3999,649.43 L 53.0398,648.23 L 54.4797,644.63 L 58.0796,646.07 L 61.4395,644.63 L 62.3994,644.39 L 72.9592,640.79 L 75.5991,636.71 L 75.5991,633.831 L 79.9189,631.911 L 81.1189,633.111 L 87.8389,632.391 L 90.9587,637.67 L 93.3586,639.35 L 94.0786,639.59 L 95.9985,640.07 L 94.3186,640.07 L 93.8386,642.47 L 90.9587,642.47 L 92.8787,645.59 L 92.8787,648.47 L 91.9187,649.67 L 93.8386,651.83 L 94.7986,659.03 L 99.8384,657.59 L 97.9185,667.91 L 95.5186,667.67 L 92.6387,669.35 L 93.8386,674.629 L 86.8787,675.589 L 82.7988,677.029 L 82.5588,679.909 L 80.3989,677.989 L 77.0391,679.189 L 76.5591,679.429 L 76.7991,681.829 L 73.9192,681.589 L 69.5994,686.149 L 60.7195,688.069 L 60.7195,689.509 L 58.3196,686.389 L 53.9998,684.469 L 51.1199,686.869 L 51.3599,689.509 L 46.8,691.429 L 48.24,693.109 L 47.52,697.668 L 45.3601,697.908 L 40.3203,696.708 L 30.9604,689.749 L 21.6006,685.909 L 21.3606,683.029 L 15.8408,675.589 L 16.3208,668.869 L 15.6008,667.429 L 17.7607,665.989 L 16.0808,665.509 L 19.2007,661.909 L 21.1206,660.709 L 17.2808,657.829 L 18.9607,654.949 L 17.2808,651.59 L 19.4407,646.79 L 19.4407,645.11 L 18.9607,640.07 L 20.4006,635.03 L 24.2405,632.39 L 24.9604,631.91 L 30.9604,633.11 L 35.0403,635.27 L 40.5601,642.23 L 43.6799,645.35">

    </path>
</g>

<g class="district" district:id="bn">
    <path d=
    "M 254.88,657.59 L 255.84,660.95 L 257.52,659.27 L 260.4,659.27 L 261.36,662.87 L 263.04,662.63 L 264.479,665.27 L 265.919,662.39 L 269.279,661.67 L 272.879,664.31 L 273.119,668.15 L 282.719,672.469 L 286.559,669.35 L 288.959,670.55 L 292.079,671.51 L 294.479,668.15 L 302.638,672.709 L 302.398,673.909 L 307.678,676.789 L 310.558,676.069 L 311.038,677.029 L 311.278,677.029 L 318.478,679.909 L 320.158,676.789 L 323.758,672.469 L 325.198,671.27 L 333.838,677.99 L 332.638,682.069 L 331.198,684.229 L 329.998,687.829 L 328.078,689.509 L 317.998,691.909 L 314.398,695.509 L 313.918,699.349 L 311.998,701.749 L 312.958,701.989 L 312.478,704.148 L 310.798,705.348 L 308.878,704.148 L 307.198,699.349 L 304.319,703.428 L 294.239,698.149 L 286.799,698.389 L 285.359,696.949 L 283.439,697.669 L 282.959,701.509 L 280.799,699.829 L 279.119,699.589 L 272.639,705.108 L 266.879,704.628 L 268.559,706.788 L 266.879,707.028 L 263.28,705.108 L 262.8,702.229 L 264.24,701.269 L 251.76,703.668 L 251.04,701.269 L 253.199,695.749 L 252.24,694.789 L 249.36,696.949 L 247.92,695.989 L 249.36,692.629 L 241.92,696.469 L 241.2,691.909 L 230.16,689.269 L 229.44,681.109 L 230.64,680.149 L 236.88,681.589 L 241.2,680.389 L 239.04,677.509 L 241.2,674.629 L 239.04,674.149 L 239.04,669.59 L 236.4,667.67 L 234.24,669.11 L 231.12,668.15 L 229.92,663.35 L 235.92,660.23 L 235.2,656.15 L 237.84,655.91 L 247.44,647.03 L 248.64,648.47 L 255.6,648.47 L 256.8,649.67 L 254.4,651.83 L 254.4,654.71 L 256.08,655.43 L 254.88,657.59">

    </path>
</g>

<g class="district" district:id="bl">
    <path d=
    "M 390.97,634.31 L 392.65,635.99 L 394.81,635.03 L 398.41,637.91 L 403.929,641.99 L 407.289,640.79 L 409.209,645.11 L 408.249,645.59 L 408.969,646.55 L 408.729,648.469 L 405.369,650.389 L 404.649,654.469 L 400.33,653.029 L 403.449,650.869 L 402.01,649.669 L 399.85,651.349 L 398.65,648.949 L 396.97,648.469 L 394.81,651.109 L 399.13,654.709 L 401.77,656.869 L 398.65,663.349 L 397.45,667.909 L 395.29,667.909 L 395.29,664.789 L 386.89,661.429 L 387.37,659.749 L 384.97,658.309 L 381.13,658.549 L 380.17,658.309 L 374.17,665.509 L 375.37,667.429 L 373.93,668.389 L 373.45,668.389 L 369.61,668.389 L 362.89,672.709 L 354.97,672.949 L 355.45,681.589 L 354.97,683.509 L 349.931,685.669 L 348.971,684.709 L 346.331,688.069 L 345.131,690.948 L 345.131,691.188 L 341.771,695.988 L 340.091,697.908 L 337.931,701.508 L 336.971,702.228 L 331.691,694.788 L 328.092,689.508 L 330.011,687.828 L 331.211,684.229 L 332.651,682.069 L 333.851,677.989 L 325.211,671.269 L 325.691,670.789 L 326.891,667.429 L 332.651,664.309 L 335.051,663.589 L 339.371,657.349 L 340.811,654.229 L 343.691,655.669 L 349.45,655.189 L 345.131,652.309 L 345.851,647.51 L 346.811,649.429 L 348.97,648.469 L 352.57,649.189 L 360.25,645.83 L 361.69,647.27 L 362.17,648.229 L 367.21,649.189 L 371.05,647.03 L 372.49,647.99 L 376.33,646.55 L 375.85,642.95 L 379.209,641.03 L 380.169,642.95 L 381.849,641.51 L 383.769,642.47 L 388.089,638.63 L 388.569,634.55 L 390.969,634.31">

    </path>

    <g>
    </g>
</g>

<g class="district" district:id="gf">
    <path d=
    "M 382.33,530.38 L 381.37,534.22 L 384.49,534.94 L 384.01,538.54 L 385.21,546.94 L 387.61,551.5 L 385.93,556.779 L 382.81,557.979 L 381.85,559.419 L 382.57,562.539 L 379.45,562.539 L 378.73,566.859 L 377.29,567.099 L 372.97,573.579 L 373.21,575.979 L 375.37,580.059 L 373.45,582.458 L 373.69,588.458 L 371.05,588.938 L 372.73,593.738 L 373.21,595.898 L 377.53,596.138 L 377.29,598.298 L 383.05,600.938 L 381.13,604.058 L 382.09,607.178 L 385.45,612.938 L 390.729,614.617 L 389.53,620.377 L 392.169,624.937 L 394.809,635.017 L 392.649,635.977 L 390.969,634.297 L 388.57,634.537 L 388.09,638.617 L 383.77,642.457 L 381.85,641.497 L 380.17,642.937 L 379.21,641.017 L 375.85,642.937 L 376.33,646.536 L 372.49,647.976 L 371.05,647.016 L 367.21,649.176 L 362.171,648.216 L 361.691,647.256 L 360.251,645.816 L 352.571,649.176 L 348.971,648.456 L 346.811,649.416 L 345.851,647.496 L 344.411,646.536 L 335.051,643.896 L 334.571,640.057 L 330.971,640.057 L 330.251,636.697 L 328.572,637.417 L 330.491,622.777 L 328.332,622.057 L 329.292,617.497 L 325.932,617.497 L 323.292,615.337 L 324.252,612.457 L 322.332,611.497 L 325.452,602.857 L 328.572,603.337 L 329.052,601.897 L 332.411,603.097 L 337.211,605.497 L 344.171,602.137 L 345.851,599.738 L 342.011,598.298 L 342.731,596.138 L 336.011,590.858 L 335.531,588.458 L 331.691,582.938 L 332.891,581.738 L 332.411,580.058 L 329.531,580.058 L 327.372,571.898 L 334.332,570.219 L 336.251,571.658 L 337.451,569.499 L 341.051,571.418 L 343.691,567.819 L 339.851,565.899 L 340.091,564.459 L 344.651,558.219 L 346.091,557.499 L 349.931,556.299 L 346.331,549.579 L 346.331,546.939 L 349.451,543.579 L 348.731,537.819 L 345.371,534.219 L 345.371,533.74 L 350.171,535.899 L 349.931,537.099 L 352.811,539.019 L 354.011,538.299 L 353.531,534.459 L 357.851,534.459 L 360.49,532.3 L 361.21,533.02 L 363.13,533.74 L 365.53,536.379 L 372.25,537.579 L 370.57,534.219 L 372.49,531.82 L 379.45,533.5 L 380.65,529.18 L 382.33,530.38">

    </path>
</g>

<g class="district" district:id="gd">
    <path d=
    "M 96.24,454.05 L 99.3599,455.97 L 102.96,455.25 L 102.96,458.61 L 108.96,459.33 L 112.8,458.37 L 116.399,459.81 L 115.679,462.45 L 118.559,466.77 L 117.359,471.329 L 117.119,471.569 L 121.439,475.649 L 120.479,483.569 L 121.679,485.249 L 119.759,484.769 L 118.079,487.169 L 119.519,490.289 L 117.599,490.529 L 115.679,494.609 L 119.519,499.888 L 117.599,503.968 L 116.159,503.248 L 113.76,505.408 L 114.24,509.728 L 111.84,512.608 L 116.159,515.008 L 116.159,517.408 L 115.919,520.048 L 118.079,520.768 L 116.879,524.607 L 115.679,528.447 L 112.8,522.927 L 109.68,523.647 L 111.6,528.447 L 106.56,525.807 L 104.64,527.247 L 102.72,525.567 L 93.6001,525.327 L 94.0801,527.487 L 91.4402,527.007 L 93.1201,529.887 L 91.4402,532.047 L 97.6802,537.567 L 95.0403,542.847 L 93.3604,541.167 L 90.9604,543.567 L 88.0806,541.887 L 85.6807,546.927 L 80.8809,544.287 L 78.001,543.807 L 75.6011,545.487 L 73.4412,548.846 L 70.5613,548.126 L 69.8413,550.766 L 67.2014,549.326 L 63.6016,551.726 L 67.2014,559.886 L 63.3616,558.446 L 61.4417,559.406 L 59.2817,557.726 L 56.1619,560.366 L 52.562,554.606 L 49.2021,553.406 L 51.3621,553.167 L 53.762,549.087 L 52.562,545.727 L 53.762,540.927 L 52.082,538.527 L 53.762,532.527 L 55.4419,527.487 L 66.0017,519.327 L 64.8018,516.208 L 66.4817,512.368 L 65.7617,509.248 L 68.8816,508.768 L 76.8015,508.768 L 77.7615,510.928 L 87.8413,513.328 L 89.0413,512.128 L 91.4412,509.488 L 87.3613,506.368 L 89.7612,498.448 L 90.0012,494.368 L 91.9211,494.368 L 90.0012,487.168 L 91.4412,487.168 L 92.1611,482.368 L 90.0012,465.089 L 93.1211,460.529 L 93.3611,457.889 L 91.9211,456.449 L 96.241,454.049">

    </path>
</g>

<g class="district" district:id="hl">
    <path d=
    "M 219.13,483.33 L 220.57,485.49 L 218.89,486.93 L 222.25,488.61 L 224.41,486.93 L 225.37,490.77 L 227.05,489.09 L 228.49,491.01 L 226.81,490.53 L 227.05,492.45 L 232.089,492.21 L 231.609,494.61 L 233.289,495.57 L 234.489,493.65 L 236.649,494.61 L 235.449,498.689 L 238.569,500.849 L 242.409,504.449 L 252.969,509.489 L 256.569,510.929 L 258.729,511.409 L 265.688,511.649 L 266.648,510.449 L 276.728,512.129 L 275.528,513.089 L 277.448,515.729 L 277.208,519.809 L 275.048,520.529 L 276.248,521.489 L 273.848,529.648 L 274.328,532.768 L 278.888,530.608 L 282.488,531.088 L 283.208,533.488 L 281.768,533.968 L 284.648,542.608 L 289.688,540.928 L 289.688,544.288 L 287.768,545.248 L 288.008,550.768 L 287.288,553.408 L 284.408,549.568 L 279.368,550.048 L 277.928,555.088 L 273.608,557.008 L 272.168,561.567 L 273.848,563.487 L 273.608,567.567 L 270.969,572.607 L 268.809,570.927 L 267.129,573.807 L 264.489,574.767 L 261.129,572.127 L 260.169,574.527 L 255.849,572.607 L 256.089,568.047 L 249.369,569.007 L 248.889,568.047 L 243.369,567.087 L 241.929,569.727 L 235.689,570.687 L 234.969,572.367 L 233.53,571.647 L 232.09,572.607 L 231.37,569.007 L 228.73,568.767 L 223.93,569.007 L 223.45,571.887 L 221.53,570.687 L 217.69,569.007 L 216.25,571.167 L 213.13,571.407 L 205.45,562.527 L 205.45,559.647 L 209.53,558.927 L 206.17,551.967 L 214.81,548.367 L 217.93,548.847 L 216.97,545.488 L 220.81,544.768 L 226.57,544.528 L 230.89,545.488 L 230.89,533.248 L 235.209,529.888 L 234.729,528.688 L 229.21,527.728 L 218.89,526.048 L 216.25,524.848 L 216.25,521.728 L 213.85,521.728 L 217.45,519.328 L 216.97,517.408 L 214.81,516.928 L 215.77,515.008 L 222.73,511.888 L 223.21,508.049 L 226.09,507.569 L 225.13,504.449 L 226.33,503.489 L 223.45,501.809 L 217.69,502.289 L 218.41,501.329 L 216.01,500.369 L 216.73,497.969 L 214.09,497.489 L 213.85,494.849 L 206.89,495.329 L 203.051,494.369 L 205.93,489.089 L 209.77,483.81 L 216.97,484.53 L 219.13,483.33">

    </path>
</g>

<g class="district" district:id="ho">
    <path d=
    "M 191.04,482.85 L 196.8,488.61 L 199.439,487.41 L 205.919,489.09 L 203.04,494.37 L 206.879,495.33 L 213.839,494.85 L 214.079,497.49 L 216.719,497.969 L 215.999,500.369 L 218.399,501.329 L 217.679,502.289 L 223.439,501.809 L 226.319,503.489 L 225.119,504.449 L 226.079,507.569 L 223.199,508.049 L 222.719,511.889 L 215.759,515.009 L 214.799,516.929 L 216.959,517.409 L 217.439,519.329 L 213.839,521.729 L 216.239,521.729 L 216.239,524.848 L 218.879,526.048 L 229.199,527.728 L 234.719,528.688 L 235.198,529.888 L 230.879,533.248 L 230.879,545.488 L 226.559,544.528 L 220.799,544.768 L 216.959,545.488 L 217.919,548.848 L 214.799,548.368 L 206.159,551.968 L 206.879,550.048 L 204.719,549.808 L 201.12,550.288 L 200.88,552.688 L 199.2,553.408 L 194.4,554.128 L 189.6,551.488 L 188.88,555.088 L 185.28,551.968 L 185.04,545.488 L 181.2,544.288 L 182.16,541.648 L 173.76,540.208 L 175.68,537.808 L 173.041,536.848 L 167.521,535.168 L 165.601,537.568 L 161.281,535.888 L 158.161,531.808 L 158.881,530.608 L 161.281,531.088 L 162.721,528.928 L 158.881,524.609 L 159.601,520.049 L 161.761,518.129 L 166.081,518.609 L 168.241,515.969 L 168.961,510.929 L 172.801,510.689 L 168.961,507.569 L 171.841,505.169 L 170.881,503.25 L 172.561,500.13 L 170.641,498.21 L 173.76,497.01 L 173.521,495.81 L 178.32,495.09 L 179.76,492.93 L 184.08,491.97 L 183.36,489.09 L 179.76,486.45 L 180.24,484.53 L 184.56,484.53 L 180.48,482.37 L 180.96,479.97 L 184.8,479.49 L 187.44,482.37 L 191.04,482.85">

    </path>
</g>
</svg>
&#13;
&#13;
&#13;

答案 1 :(得分:-2)

而不是这种风格

.district path {
            fill: none;
            stroke: #6e6e6e;
            stroke-width:0.5;
}

使用这个

.district path {
                fill: #ffffff;
                stroke: #6e6e6e;
                stroke-width:0.5;
    }