[英]Integrate SeqeunceJS with Twitter Bootstrap 3.0
I want to add parallax scrolling effect to my bootstrap theme, and I came across SequenceJS. 我想为我的引导主题添加视差滚动效果,并且遇到了SequenceJS。
Can I use both of them without overriding each other? 我可以同时使用它们两者吗?
how should I do that: 我该怎么做:
Thanks! 谢谢!
Yes you can use both SequenceJS & Bootstrap without conflict. 是的,您可以同时使用SequenceJS和Bootstrap而不会发生冲突。
Some important things to keep in mind: 请记住一些重要的事情:
include the correct jQuery version - you'll need to include jQuery v 1.9.0 or 1.9.1, as the lowest Bootstrap 3 supports is 1.9.0 and the highest SequenceJS supports is 1.9.1. 包括正确的jQuery版本-您需要包括jQuery v 1.9.0或1.9.1,因为最低的Bootstrap 3支持是1.9.0,最高的SequenceJS支持是1.9.1。 (see https://github.com/twbs/bootstrap/blob/v3.2.0/bower.json & http://www.sequencejs.com/developers/documentation/#add-files respectively).
(分别参见https://github.com/twbs/bootstrap/blob/v3.2.0/bower.json和http://www.sequencejs.com/developers/documentation/#add-files )。
order your javascript libraries in the right order (jQuery, then Bootstrap, then SequenceJS). 按正确的顺序对javascript库进行排序(依次是jQuery,Bootstrap和SequenceJS)。
Here's a jsfiddle that demonstrates the two combined libraries - http://jsfiddle.net/bzelip/keu606ed/ . 这是一个jsfiddle,演示了两个组合的库-http: //jsfiddle.net/bzelip/keu606ed/ 。
I created it using the Jumbotron Bootstrap template & the parallax Sequence theme. 我使用Jumbotron Bootstrap模板和视差序列主题创建了它。 In the bootstrap html, I replaced the row with three columns below the jumbotron with a row with one full column, in which I inserted the html from the parallax Sequence theme.
在bootstrap html中,我将jumbotron下方的三列替换为一整列,并将其中的一行插入了视差序列主题中的html。 I then combined the css from both sources, linked to the required javascripts, and pasted in the contents of the script included in the parallax Sequence theme titled
sequencejs-options.sliding-horizontal-parallax.js
. 然后,我将来自两个来源的css组合在一起,并链接到所需的javascript,并粘贴在名为
sequencejs-options.sliding-horizontal-parallax.js
的视差序列主题中的脚本内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.