Javascript:
<script type="text/javascript">
$(function() { $('.cat_name').tipsy({gravity: 's'}); });
</script>
TPL聪明:
<div id="content_inside">
<a href="#" title="Test" id="1" class="cat_name">
<div class="box">
</div>
</a>
<a href="#" title="Test2" id="2" class="cat_name">
<div class="box">
</div>
</a>
</div><!-- content end -->
CSS:
#content_inside {
height: 500px;
width: 950px;
padding:5px;
}
.box {
width: 300px;
height: 261px;
padding: 5px;
float: left;
}
.box {
margin: auto;
background: url(../images/box1.jpg) no-repeat top left;
}
我需要在每个 div 链接的上部中心放置醉酒,怎么做?现在醉酒总是显示在左侧。在 img 中如何以及如何需要的示例:http: //oi43.tinypic.com/adka3t.jpg