?php$sql=$empire->query("select classid,classname,bname from {$dbtbpre}enewsclass where bclassid=0 and showclass=0 order by myorder,myorder asc");while($s=$empire->fetch($sql)){$classurl=sys_ReturnBqClassname($s,9); $t;$fr=explode('|',$class_r[$GLOBALS[navclassid]][featherclass]);$topbclassid=$fr[1]?$fr[1]:$GLOBALS[navclassid];if($topbclassid==$s[classid]){$tclass='on';}if($s[classid]==22) {echo 'a href="'.$classurl.'" title="'.$s[bname].'" target="_blank">'.$s[bname].'span >/span>/a>';}else{echo 'a href="'.$classurl.'" title="'.$s[bname].'" target="_blank">'.$s[bname].'/a>';}}?>
如果classid是22,则显示span class=”icon_hot2_new”>/span>如果不是就正常显示。B7O办公区 - 实用经验教程分享!
css部分:B7O办公区 - 实用经验教程分享!
.navbar .icon_hot2_new { background: url(/skin/zhann/images/hot.png) no-repeat scroll 0 0; width: 21px; height: 12px; display: block; position: absolute; right: 16%; top: 8%;}
效果:B7O办公区 - 实用经验教程分享!
B7O办公区 - 实用经验教程分享!
以上方法由办公区教程网编辑摘抄整理自互联网仅供大家参考!B7O办公区 - 实用经验教程分享!