实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html lang="zh-CN">
3
<head>
4
<meta charset="utf-8">
5
<title>jQuery幻灯片插件Owl Carousel演示-加载JSON</title>
6
<style>
7
#owl-demo { width: 900px; margin-left: auto; margin-right: auto;}
8
#owl-demo .item{ display: block; margin: 5px;}
9
#owl-demo img { display: block; width: 100%;}
10
</style>
11
        <link href="/api/jq/5733e359e0d42/css/owl.carousel.css" rel="stylesheet">
12
        <link href="/api/jq/5733e359e0d42/css/owl.theme.css" rel="stylesheet">
13
        <script src="http://www.sucaihuo.com/Public/js/other/jquery.js"></script>
14
        <script src="/api/jq/5733e359e0d42/js/owl.carousel.js"></script>
15
<script>
16
$(function(){
17
    $('#owl-demo').owlCarousel({
18
        jsonPath: '/api/jq/5733e359e0d42/json/data.json'
19
    });
20
});
21
</script>
22
</head>
23
<body>
24
<div class="main">
25
    <div class="mianc">
26
        <h1>加载JSON</h1>
27
28
        <!-- Demo -->
29
        <div id="owl-demo" class="owl-carousel">
30
        </div>
31
        <!-- Demo end -->
32
    </div>
33
</div>
34
</body>
35
</html>