0

私のhtmlには、2<area>つの国をマップする座標を持つ2つのタグがあります。私が使用したツールは、html と css を生成しました。領域にカーソルを合わせると、少し透明になりたい..しかし、これは起こっていません。これが私のコードです:

<div class="cicka">
<area class="areas" shape="poly" coords="400,141,398,144,396,145,394,147,392,147,389,149,387,149,385,149,383,151,381,152,379,154,377,155,375,156,378,162,379,168,385,172,383,176,379,177,381,182,386,185,392,186,397,190,392,192,388,193,385,194,384,196,384,201,383,205,389,206,392,212,389,215,387,219,385,222,385,228,387,234,391,234,396,239,400,244,400,250,396,249,392,249,389,249,392,254,398,259,400,264,400,270,398,270,394,269,391,270,392,276,396,282,401,286,406,291,409,297,413,294,418,299,423,301,430,302,430,307,425,309,421,310,420,314,422,319,427,323,428,329,434,333,439,339,441,345,441,352,447,355,446,347,448,342,452,339,457,338,463,339,469,338,471,334,477,333,483,333,485,329,492,329,498,330,499,327,505,328,508,324,511,321,511,317,507,314,508,309,507,303,507,299,511,298,516,299,517,294,521,291,523,288,525,283,521,281,519,277,516,274,513,274,511,272,509,269,506,265,505,261,503,259,501,254,501,249,502,246,505,242,508,239,509,232,506,228,503,225,504,219,508,217,514,218,513,214,508,213,504,211,502,209,498,211,496,215,493,218,490,218,489,214,487,213,482,213,479,212,476,209,473,209,469,209,467,207,463,206,464,202,470,203,468,199,463,196,465,193,468,191,467,187,463,187,458,185,456,183,453,182,451,181,449,178,448,176,445,176,441,176,443,173,445,171,445,167,443,164,445,161,440,160,438,159,437,156,434,152,428,150,428,148,426,146,423,144,423,141,420,143,418,141,416,140,415,140,410,140,408,144,406,143,406,141,405,142," href="" alt="" title=""   />
</div>

および次の js:

<script>
        $(".cicka").hover(function() {
      $(this).stop().animate({opacity: "0.2"}, 'slow');
    },
    function() {
      $(this).stop().animate({opacity: "1"}, 'slow');
    });
    </script>

通常の div でこの関数を呼び出すと、透明になります。ただし、領域をラップする div で呼び出すと、何も起こりません。私が間違っていることを教えてもらえますか?

再度、感謝します

4

1 に答える 1

-1

国の画像を作成し、その画像に地図を割り当て、エリアにカーソルを合わせた後、画像の不透明度を変更したいと思うかもしれません。マップを作成する

<img src="country1.jpg" alt="country1" usemap="#map1">

<map name="map1" class="areas">
<area id="area1" shape="poly" coords="......" alt="Country 1">
</map>

次にjQuery

于 2012-10-21T14:20:30.167 に答える