日期:2014-05-17 浏览次数:20642 次
/*热门代购品牌_right*/
.mid_hot{ float:left; width:970px; height:27px; background:url(../image/rmdgpp1.png) no-repeat; margin:10px 0px ;}
.mid_hot_pplogo{ float:left; width:969px; height:103px;border-left: #a2a2a2 1px solid; border-top: #a2a2a2 1px solid;overflow:hidden;}
.brand_item a {display: block;width: 87px; height:50px; float:left;}
.brand_item a:hover {text-decoration:none;}
.brand_item a.brand_name {border-right: #a2a2a2 1px solid; border-bottom: #a2a2a2 1px solid;}
.brand_item a.brand_detail {border-right: #a2a2a2 1px solid; border-bottom: #a2a2a2 1px solid;}
<SCRIPT type=text/javascript>
$(document).ready(function(){
// 判断img轮转,实现a跳转
// 推荐品牌滑动翻转效果
brandPicTurn();
});
function brandPicTurn(){
$(".brand_detail").hide();
$(".brand_item").hover(
function(){
$(this).children(".brand_name").hide();
$(this).children(".brand_detail").show();
}
, function(){
$(this).children(".brand_detail").hide();
$(this).children(".brand_name").show();
}
);
}
</SCRIPT>
<div class="mid_hot">
<!--热门品牌-->
</div>
<div class="mid_hot_pplogo">
<ul class="ui_brands">
<?php
$result = mysql_query("SELECT * FROM brand;");
while($row = mysql_fetch_array($result)){
echo
"<li class='brand_item'>
<a class='brand_name' href='".$row['brandURL']."' target=_blank >
<img src='".$row['brandImgOne']."' alt=''/></a>
<a class='brand_detail' href='".$row['brandURL']."' target=_blank>
<img src='".$row['brandImgTwo']."' alt='' /></a></li>";
}?>
</ul>
</div>