gpt4 book ai didi

javascript - GalleryView Jquery

转载 作者:行者123 更新时间:2023-11-28 10:31:50 25 4
gpt4 key购买 nike

我正在尝试实现 this JqueryGallery 到我的网站(大灰色框)。现在我的问题是图像没有出现。

这是我的website

这是我的标题代码:

<link href="css/galleryview.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.galleryview-2.1.1.js"></script>
<script type="text/javascript" src="js/jquery.timers-1.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#photos').galleryView({
panel_width: 655,
panel_height: 336,
transition_speed: 1500,
transition_interval: 5000,
nav_theme: 'dark',
border: '1px solid white',
pause_on_hover: true,
});
});
</script>

这是我的画廊代码:

<div id="photos" class="galleryview">
<div class="panel">
<img src="http://spaceforaname.com/img/gallery/01.jpg" />
<div class="panel-overlay">

<h2>Effet du soleil sur le paysage</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/tomharry" target="_blank">tomharry</a>. View full-size photo <a href="http://www.sxc.hu/photo/158829" target="_blank">here</a>.</p>
</div>
</div>
<div class="panel">
<img src="http://spaceforaname.com/img/gallery/02.jpg" />
<div class="panel-overlay">

<h2>Eden</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/emsago" target="_blank">emsago</a>. View full-size photo <a href="http://www.sxc.hu/photo/152865" target="_blank">here</a>.</p>
</div>
</div>
<div class="panel">
<img src="http://spaceforaname.com/img/gallery/03.jpg" />
<div class="panel-overlay">

<h2>Snail on the Corn</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/baines" target="_blank">baines</a>. View full-size photo <a href="http://www.sxc.hu/photo/34453" target="_blank">here</a>.</p>
</div>
</div>
<div class="panel">
<img src="http://spaceforaname.com/img/gallery/04.jpg" />
<div class="panel-overlay">

<h2>Flowers</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/jazza" target="_blank">jazza</a>. View full-size photo <a href="http://www.sxc.hu/photo/990169" target="_blank">here</a>.</p>
</div>
</div>
<div class="panel">
<img src="http://spaceforaname.com/img/gallery/06.jpg" />
<div class="panel-overlay">

<h2>Alone Beach 2B</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/sgursozlu" target="_blank">sgursozlu</a>. View full-size photo <a href="http://www.sxc.hu/photo/738279" target="_blank">here</a>.</p>
</div>
</div>
</div>

最佳答案

很高兴你明白了。但仅供引用,要利用新脚本 2.1.1:您的代码应如下所示:

<ul id="photos" class="galleryview">
<li>
<img src="http://spaceforaname.com/img/gallery/01.jpg" />
<div class="panel-overlay">
<h2>Effet du soleil sur le paysage</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/tomharry" target="_blank">tomharry</a>. View full-size photo <a href="http://www.sxc.hu/photo/158829" target="_blank">here</a>.</p>
</div>
</li>
<li>
<img src="http://spaceforaname.com/img/gallery/02.jpg" />
<div class="panel-overlay">
<h2>Eden</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/emsago" target="_blank">emsago</a>. View full-size photo <a href="http://www.sxc.hu/photo/152865" target="_blank">here</a>.</p>
</div>
</li>
<li>
<img src="http://spaceforaname.com/img/gallery/03.jpg" />
<div class="panel-overlay">
<h2>Snail on the Corn</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/baines" target="_blank">baines</a>. View full-size photo <a href="http://www.sxc.hu/photo/34453" target="_blank">here</a>.</p>
</div>
</li>
<li>
<img src="http://spaceforaname.com/img/gallery/04.jpg" />
<div class="panel-overlay">
<h2>Flowers</h2>
<p>Photo by <a href="http://www.sxc.hu/profile/jazza" target="_blank">jazza</a>. View full-size photo <a href="http://www.sxc.hu/photo/990169" target="_blank">here</a>.</p>
</div>
</li>
</ul>

正如您所看到的,代码更干净,并且在 HTML 方面语义更正确(查找 Divitis ),因此可能值得升级。 :)

关于javascript - GalleryView Jquery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2850236/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com