可以停止jQuery循环以覆盖内联绝对位置吗? [英] Can you stop jquery cycle from overwriting inline absolute position?

查看:63
本文介绍了可以停止jQuery循环以覆盖内联绝对位置吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

循环用top:0 left:0覆盖div中图像的位置,有没有一种方法可以停止,所以我可以使用内联定位?

Cycle overwrites the position for the images in the div with top:0 left:0 is there a way to stop that so I can use inline positioning?

推荐答案

否.您可以循环一些div,并且可以在这些div内使用图像上所需的任何内联样式. jQuery Cycle使用其自身对循环元素的定位来制作幻灯片.这是一个示例:

No.. You can cycle some divs and inside those divs you can use whatever inline styles you need on the images. Jquery Cycle uses its own positioning of the cycled elements to make the slideshow. Here is an example:

<div id="slideshow">
  <div><img src="pic.png" style="margin-left:10px" /></div>
  <div><img src="pic2.png" style="margin-left:10px" /></div>
  <div><img src="pic3.png" style="margin-left:10px" /></div>
  <div><img src="pic4.png" style="margin-left:10px" /></div>
  <div><img src="pic5.png" style="margin-left:10px" /></div>
</div>

$('#slideshow').cycle();

这篇关于可以停止jQuery循环以覆盖内联绝对位置吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆