【问题标题】:set the width and height of the thumbnail in bxslider plugin in jquery在jquery的bxslider插件中设置缩略图的宽度和高度
【发布时间】:2015-05-20 07:22:10
【问题描述】:

我使用 bxslider jquery 插件创建幻灯片。我想设置缩略图的宽度和高度。在bxslider jquery插件中有没有设置缩略图宽度和高度的选项。

【问题讨论】:

  • thumbnail 方法用作自定义寻呼机。这取决于您如何使用 css 设置缩略图的宽度和高度或直接设置缩略图图像标签.. 在这里查看演示 bxslider.com/examples/thumbnail-pager-1

标签: jquery plugins jquery-plugins bxslider


【解决方案1】:

用于通过 jQuery 调整宽度和高度

Javascript


$('.bxslider').bxSlider({
  slideWidth: 100,
  adaptiveHeight: true
});

HTML


<ul class="bxslider">
  <li><img src="imagePath" /></li>
  <li><img src="imagePath" /></li>
  <li><img src="imagePath" /></li>
</ul>

用于从 css 调整宽度和高度

.bx-wrapper .bx-viewport {
width: 100px!important; // Set your width here
height: 100px!important;// Set your height here
}

【讨论】:

  • 答案永远不应该只链接到解决方案,如果网站出现故障,您的答案将变得毫无价值。请始终提供一些有关如何解决问题的信息。
  • 没问题 ;) 您可以提供链接,但也始终自己提供信息,链接更像是“来源”,而不是“去这里阅读自己”。 :)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-11-13
  • 2013-09-29
  • 1970-01-01
  • 1970-01-01
  • 2015-04-24
  • 2012-03-01
  • 2014-06-21
相关资源
最近更新 更多