jquery 实现背景图片循环切换,显示隐藏div

这篇博客介绍了如何使用jQuery来实现在页面中背景图片的循环切换效果,并展示了如何通过点击操作来显示或隐藏一个div内容。具体实现涉及到CSS样式设置,如背景图片的定位和浮动,以及jQuery事件监听和DOM操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

jquery实现图片背景循环切换,显示隐藏一个div。


<script type="text/javascript">

$(function(){
$("#table4").hide();
$(".o_record p span").toggle(function(){
$(this).addClass("o_span");
$("#table4").show();
},function(){
$(this).removeClass("o_span");
$("#table4").hide();
})
});

</script>

<stype type="text/css">

.o_layout .o_record p .o_span{ float:right; display:inline; width:60px; background:url(../images/20140918010340704_easyicon_net_16.png) no-repeat right;cursor:pointer;}
.o_up{ float:right; display:inline; width:60px;background:url(../images/20140918010354231_easyicon_net_16.png) no-repeat right; cursor:pointer;}
.o_layout .o_record .table4{margin-top:10px;}

</style>

 <div class="o_record">
    <p><i class="r_icon"></i>操作历史记录<span class="o_up">|&nbsp;&nbsp;展开</span></p>
    <div class="table4" id="table4">
      <table>
        <tbody>
          <tr>
            <th class="col_width2">操作者</th>
            <th class="col_width2">操作时间</th>
            <th class="col_width2">操作状态</th>
            <th>备注</th>
          </tr>
        </tbody>
        <tbody> <tr>
            <th class="col_width2"></th>
            <th class="col_width2"></th>
            <th class="col_width2"></th>
            <th></th>
          </tr></tbody>
      </table>
    </div>
  </div>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值