我已經得到了下面的html,我希望通過它自動循環。它目前通過onclick手動完成。但我怎樣才能讓它循環?它基本上只是改變了類名稱上的包裝DIV像這樣:通過tab1
class="background_tab1"
循環:循環通過類
<body>
<div id="client-relations-bg" class="background_tab1">
...content...
</div>
</body>
我這裏有一流的圖像信息,在頭:
<style type="text/css">
#client-relations-bg.background_tab1{background: url('/media/2/background-image-1.png') no-repeat center top;}
#client-relations-bg.background_tab2{background: url('/media/32/background-image-6.jpg') no-repeat center top;}
#client-relations-bg.background_tab3{background: url('/media/17/background-image-3.jpg') no-repeat center top;}
#client-relations-bg.background_tab4{background: url('/media/12/background-image-2.png') no-repeat center top;}
#client-relations-bg.background_tab5{background: url('/media/22/background-image-4.jpg') no-repeat center top;}
#client-relations-bg.background_tab6{background: url('/media/37/background-image-7.jpg') no-repeat center top;}
#client-relations-bg.background_tab7{background: url('/media/2900/Header_image.jpg') no-repeat center top;}
</style>
所以我需要這個到tab7
。
看看使用jquery嗎? – CR41G14
@ CR41G14:單憑這一點無助於解決問題。另外,如果沒有jQuery,這絕對是可能的,但也許並不那麼容易。 – Constantinius
@Constantinius我基本上正在爲研究設置一個平臺 – CR41G14