如何在html页面中运行图像滑块 [英] how to run a image slider in a html page

查看:121
本文介绍了如何在html页面中运行图像滑块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<div id="slide">
	 <img src="images/new images/slide1.jpg" width="970" height="260"  alt="Slide" />
 	<img src="images/new images/slide2.jpg" width="970" height="260"  alt="Slide" />
 	<img src="images/new images/slide3.jpg" width="970" height="260"  alt="Slide" />
   	 <img src="images/new images/slide4.jpg" width="970" height="260"  alt="Slide" />
   	 
</div><!-- pic -->
		<script type="text/javascript">
		$(document).ready(function() {
			$('#slide').cycle({
				fx: 'fade', 
				speed: 1500,
				timeout: 5000
			});
		});
		</script>

推荐答案

document )。ready( function (){
(document).ready(function() {


' #slide')。cycle({
fx:' 淡入淡出'
速度: 1500
超时: 5000
});
});
< / script >
('#slide').cycle({ fx: 'fade', speed: 1500, timeout: 5000 }); }); </script>


问题

我猜你忘了链接 jQuery Cycle Plugin File [ ^ ]



解决方案

只需保存此 js 文件并链接到您的项目中。



演示

[演示]循环插件示例 [ ^ ]



参考 - jQuery Cycle Plugin [ ^ ]
Problem
I guess you have forgotten to link the jQuery Cycle Plugin File[^].

Solution
Just save this js file and link in your project.

Demo
[Demo] Cycle Plugin Example[^]

Reference - jQuery Cycle Plugin[^]


这篇关于如何在html页面中运行图像滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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