#slider .nivo-controlNav {
position:absolute;
bottom:-70px; /* Put the nav below the slider */
}
#slider .nivo-controlNav img {
display:inline; /* Unhide the thumbnails */
position:relative;
margin-right:10px;
}
我也遇到了这个问题,希望它对某人有帮助。
I have found that the theme 'default.css' conflicts with the img styling (as noted in their tutorial). You need to comment out the css styles in default.css for the following classes:
.theme-default .nivoSlider img
.theme-default .nivoSlider a
.theme-default .nivo-controlNav
.theme-default .nivo-controlNav a
.theme-default .nivo-controlNav a.active
And, as noted in their tutorial, you need to add this styling:
#slider .nivo-controlNav {
position:absolute;
bottom:-70px; /* Put the nav below the slider */
}
#slider .nivo-controlNav img {
display:inline; /* Unhide the thumbnails */
position:relative;
margin-right:10px;
}
I had trouble too with this, hope it helps someone.
当然,很多可以进行一些改进,但正如我所说,这是一个快速解决方案。如果 Nivo 滑块的下一版本能够选择将缩略图放置在不同的位置,那就太好了。
希望这有帮助;)
I had lots of troubles finding where my thumbnails are as well. I finally found them by positionning them "absolute", and they finally appeared in the middle of the slideshow :)
But I don't really like the way they're displayed, so I made a quick fix which requires to edit the script a bit.
In jquery.nivo.slider.js, add this at the beginning of the file:
var thumbnails = $("#thumbnails"); // this is where your thumbnails will be
Then find this:
//Add Control nav
if(settings.controlNav){
var nivoControl = $('<div class="nivo-controlNav"></div>');
slider.append(nivoControl);
And replace with
//Add Control nav
if(settings.controlNav){
var nivoControl = $('<div class="nivo-controlNav"></div>');
thumbnails.append(nivoControl);
Then place a somewhre in your page, and you're done :)
Of course, lots of improvements can be done, but as I said it's a quick fix. That would be nice if next versions of Nivo slider had an option to place the thumbnails in a different location.
.nivo-controlNav a {
display:inline; /* Display the thumbnail link element */
}
#slider .nivo-controlNav img {
display:inline; /* Un-hide the thumbnail image element */
position:relative;
margin: 10px 10px 0 0; /* Provide some white space around the thumbs */
}
#slider .nivo-controlNav {
position: absolute;
top: 600px; /* 600px is the height of our images in the slider */
}
并且在调用 Nivo 时不要忘记设置这些参数:
$('#slider').nivoSlider({
controlNav:true, /* Display the control navigation */
controlNavThumbs:true, /* Display thumbnails */
controlNavThumbsFromRel:true, /* Source thumbnails from rel attribute */
});
I had a great deal of difficulty getting image thumbnails to work properly myself. This worked for me. Full details at my blog entry.
Add this CSS styling as the last to load (include it in a LINK beneath the other core Nivo CSS sheets)
.nivo-controlNav a {
display:inline; /* Display the thumbnail link element */
}
#slider .nivo-controlNav img {
display:inline; /* Un-hide the thumbnail image element */
position:relative;
margin: 10px 10px 0 0; /* Provide some white space around the thumbs */
}
#slider .nivo-controlNav {
position: absolute;
top: 600px; /* 600px is the height of our images in the slider */
}
And don't forget to set these parameters when you call Nivo:
$('#slider').nivoSlider({
controlNav:true, /* Display the control navigation */
controlNavThumbs:true, /* Display thumbnails */
controlNavThumbsFromRel:true, /* Source thumbnails from rel attribute */
});
发布评论
评论(4)
我发现主题“default.css”与 img 样式冲突(如教程中所述)。您需要注释掉 default.css 中以下类的 css 样式:
并且,如其 教程,你需要添加这个样式:
我也遇到了这个问题,希望它对某人有帮助。
I have found that the theme 'default.css' conflicts with the img styling (as noted in their tutorial). You need to comment out the css styles in default.css for the following classes:
And, as noted in their tutorial, you need to add this styling:
I had trouble too with this, hope it helps someone.
我也很难找到缩略图的位置。我终于通过将它们定位为“绝对”找到了它们,它们最终出现在幻灯片的中间:)
但我不太喜欢它们的显示方式,所以我做了一个快速修复,需要编辑脚本少量。
在 jquery.nivo.slider.js 中,在文件开头添加:
然后找到这个:
并替换为
查找这个:
替换为:
然后在页面中放置一个,就完成了:)
当然,很多可以进行一些改进,但正如我所说,这是一个快速解决方案。如果 Nivo 滑块的下一版本能够选择将缩略图放置在不同的位置,那就太好了。
希望这有帮助;)
I had lots of troubles finding where my thumbnails are as well. I finally found them by positionning them "absolute", and they finally appeared in the middle of the slideshow :)
But I don't really like the way they're displayed, so I made a quick fix which requires to edit the script a bit.
In jquery.nivo.slider.js, add this at the beginning of the file:
Then find this:
And replace with
Find this:
Replace with:
Then place a somewhre in your page, and you're done :)
Of course, lots of improvements can be done, but as I said it's a quick fix. That would be nice if next versions of Nivo slider had an option to place the thumbnails in a different location.
Hope this helped ;)
Nivo 网站有一个新的演示,展示了缩略图的工作原理:http://nivo.dev7studios.com/demos/
相关示例具有以下 CSS 样式:
请注意
.nivo-controlNav
类中的a
和img
标记的方式使用display: inline
,这是使其工作的关键。其他属性用于定位导航栏和添加阴影。
The Nivo site has a new demo that shows how the thumbnails work: http://nivo.dev7studios.com/demos/
The relevant example has the following CSS styling:
Note how both the
a
and theimg
tag in the.nivo-controlNav
class usedisplay: inline
, that is key to making it work.The other properties are for positioning the nav bar and adding drop shadows.
我自己在让图像缩略图正常工作方面遇到了很大的困难。这对我有用。完整详细信息请访问我的博客文章。
将此 CSS 样式添加为最后加载(将其包含在其他核心 Nivo CSS 表下方的链接中),
并且在调用 Nivo 时不要忘记设置这些参数:
I had a great deal of difficulty getting image thumbnails to work properly myself. This worked for me. Full details at my blog entry.
Add this CSS styling as the last to load (include it in a LINK beneath the other core Nivo CSS sheets)
And don't forget to set these parameters when you call Nivo: