问题描述
我一直在为自己的一生而努力,以使基本的Orbit旋转木马可以正常工作,但这只是没有发生.谁能看到我要去哪里错了?我尝试了各种替代方法,并查看了文档,但无济于事:
I'm been trying for the life of me to get a basic Orbit carousel to work but it just isn't happening. Can anyone see where I'm going wrong? I've tried various alternatives and had a look at the documentation but am getting nowhere:
以下代码:
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Orbit Test</title>
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/app.css" />
</head>
<body>
<div class="row">
<div class="large-12 columns">
<ul data-orbit>
<li>
<div>
<p><strong>This is item 1.</strong> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</li>
<li>
<div>
<p><strong>This is item 2.</strong> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</li>
<li>
<div>
<p><strong>This is item 3.</strong> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</li>
<li>
<div>
<p><strong>This is item 4.</strong> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</li>
</ul>
</div>
</div>
<script src="js/vendor/jquery.min.js"></script>
<script src="js/foundation.min.js"></script>
<script>$(document).foundation();</script>
</body>
</html>
推荐答案
在foundation.css
css导入后,在<head>
中添加:
After your foundation.css
css import in the <head>
add:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/motion-ui/1.1.1/motion-ui.min.css" />
或使用您自己下载的motion-ui样式表副本.
信用:
or use your own downloaded copy of the motion-ui style sheet.
Credit:
我在Github上找到了一个线程,其中提到需要包含Motion UI CSS:
I found a thread on Github that mentions the need for the Motion UI CSS to be included:
在Foundation 6 Motion UI文档中,我发现提到了Motion UI CSS对于在Orbit,Toggler和Reveal组件中进行转换是必要的:
In the Foundation 6 Motion UI doc, I found the mention of the Motion UI CSS being necessary for transitions in the Orbit, Toggler and Reveal components:
在Motion UI文档中,还有指向CDN的链接:
And down in the Motion UI doc there is link to the cdn:
这篇关于无法使Orbit Carousel在Foundation 6.2.0中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!