我正在嘗試製作圖像幻燈片。我沒有Jquery的經驗,我需要一些幫助。所以基本上我有一個div#幻燈片中的圖像。我想要在那裏放置多個圖像,並使用Jquery的強大功能,當用戶單擊左/右按鈕時,它將變爲下一張圖像。這裏是我的HTML代碼部分 -使用JQuery通過鼠標單擊來更改圖像
<!DOCTYPE html>
<html lang="en">
<head>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<style>
body {
background: url(bg.png);
width: 999px;
font-family: 'Open Sans', sans-serif;
margin: 0 auto;
}
p {
color: #222;
}
a {
color: #777;
font-size: 14px;
font-weight: bold;
text-decoration: none;
padding: 10px;
}
#nav {
float: right;
}
#slideshow {
width: 999px;
margin: 100px -50px;
}
#content {
background: #FFF;
padding: 50px;
height: 500px;
border-radius: 1px;
margin: 50px auto;
}
</style>
</head>
<body>
<div id="content">
<div id="nav">
<a href="..">Home</a>
<a href="..">About</a>
<a href="..">Work</a>
<a href="..">Contact</a>
</div>
<div id="slideshow">
<img src="image.jpg" />
</div>
</div>
</body>
</html>
那麼你使用一些現有的jQuery插件,如: http://www.slidesjs.com/ –
對於[使用插件](http://www.google.com/search q = jquery的+庫)? –
http://bit.ly/NYEjfY – Fresheyeball