HTML:如何将类属性添加到区域标记

时间:2014-10-29 18:53:09

标签: html css

我在html中有地图的区号,我需要为此添加类: -

<area shape="rect" coords="<?php echo $coords; ?>" href="javascript:void(0);" id="poplink_<?php echo $units_id; ?>" <? if ($status_units == "sale"){?> class="sale" <? } elseif ($status_units == "was_book"){?> class="was_book" <? } else {?> class="was_sale" <? } ?>> 

在PHP中打印如下: -

<area shape="rect" coords="<?php echo $coords; ?>" href="javascript:void(0);" id="poplink_<?php echo $units_id; ?>" class="sale" > 

课程就像: -

.sale{ background: url(../images/sale.png);
background-position: 97% center;
background-repeat: no-repeat;
padding-right: 34px;
display: inline-block;
position: relative;
cursor: pointer;}
.was_book{ background: url(../images/was_book.png);
background-position: 97% center;
background-repeat: no-repeat;
padding-right: 34px;
display: inline-block;
position: relative;
cursor: pointer;}
.was_sale{ background: url(../images/was_sale.png);
background-position: 97% center;
background-repeat: no-repeat;
padding-right: 34px;
display: inline-block;
position: relative;
cursor: pointer;}

我有图片显示所有可用的软管销售,我需要添加标记出售房子,像谷歌地图。

错误是,班级的图像没有显示。为什么!!!

0 个答案:

没有答案