将CSS添加到asp图像映射热点

时间:2016-10-04 11:23:45

标签: css asp.net imagemap

我有一张黑白照片。我使用asp图像映射“映射”它。

现在我想要的是,每次我将悬停在一个“映射”区域时,它将获得颜色并产生一些其他效果(使用ccs)。

我知道如何做css部分,但出于某种原因我无法将css类添加到这些区域。

我尝试在CssClass="Something"标记内写class="Something"asp:PolygonHotSpot,但它给了我一个错误,说我不能这样做。

我试图将div放在asp:PolygonHotSpot标记周围,但它也给我一个错误。

如何将css添加到asp:PolygonHotSpot代码?

<asp:imagemap id="SomeID"  imageurl="../User/Pictures/SomePicture.png" hotspotmode="Postback" onclick="SomeID_Clicked" runat="Server"> 

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="A" coordinates="37,303,42,271,57,227,71,198,88,167,111,144,165,111,194,98,250,89,278,86,327,82,418,76,539,80,611,91,658,104,701,132,723,146,752,178,773,214,787,256,795,305,803,308,813,305,814,294,811,258,800,214,782,168,759,139,721,105,688,82,646,66,603,52,558,44,466,39,409,37,314,42,259,50,190,66,146,83,115,102,77,137,52,177,42,201,25,256,22,292,23,303"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="B" coordinates="237,262,252,253,289,247,322,245,337,246,338,225,332,173,329,147,330,131,292,135,227,145,199,155,201,167,205,176,201,181,208,200,213,216,187,235,172,252,172,258,203,270,224,279"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="C" coordinates="501,245,502,218,509,153,510,133,537,134,573,137,612,144,639,154,639,164,630,175,636,180,621,212,637,222,647,233,658,243,665,257,642,267,610,279,605,270,596,259,583,252,566,252,539,249"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="D" coordinates="337,242,336,220,332,174,329,148,326,131,339,131,369,128,392,131,428,129,479,129,505,132,512,135,507,162,502,233,502,244"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="E" coordinates="336,529,333,578,314,578,309,632,311,641,327,646,326,658,351,666,439,665,507,663,509,644,529,643,530,627,527,592,521,580,506,576,502,527,450,528,452,535,384,536,385,529"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="F" coordinates="198,158,203,171,203,178,208,197,213,212,170,260,186,263,207,271,224,276,222,294,214,321,208,373,208,419,218,459,233,500,237,511,235,521,223,548,212,575,194,617,182,611,136,583,115,548,102,514,92,472,87,433,86,383,87,314,100,273,107,244,140,193,182,164"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="G" coordinates="610,278,665,259,661,245,622,214,630,195,636,179,636,164,640,154,655,160,671,171,686,181,701,196,716,220,732,251,743,287,749,319,753,420,743,496,710,571,683,600,646,622,598,509,608,497,616,481,622,448,628,402,627,346,618,304"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="H" coordinates="196,156,175,104,199,98,238,90,286,84,335,78,404,75,483,76,559,82,615,91,644,100,659,104,642,155,624,148,604,143,579,137,506,132,429,129,387,130,325,133"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="I" coordinates="196,156,145,189,118,225,98,274,90,308,86,347,88,397,89,440,94,491,106,530,119,553,130,570,153,597,170,608,149,637,135,633,122,624,105,609,80,581,59,547,50,507,37,449,32,341,48,250,56,227,73,194,96,161,125,130,154,116,177,105"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="J" coordinates="640,154,660,107,671,110,715,134,730,148,748,170,774,207,779,223,789,262,798,315,800,388,791,463,797,470,782,524,767,564,749,586,732,602,716,619,694,631,685,629,674,610,691,593,717,560,733,530,743,491,748,454,755,398,753,356,746,307,735,254,710,207,697,190"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="K" coordinates="187,632,238,514,275,522,335,526,333,579,315,579,309,641,326,642,325,659,268,653,231,647"/>

<asp:PolygonHotSpot hotspotmode="Postback" postbackvalue="L" coordinates="501,525,560,522,588,518,599,509,605,524,613,543,620,560,631,589,639,613,642,621,672,606,680,621,687,634,675,638,665,628,614,650,588,653,566,657,511,663,511,645,527,643,526,616,523,578,504,579"/>


</asp:imagemap>

0 个答案:

没有答案