-
Notifications
You must be signed in to change notification settings - Fork 55
/
index.html
128 lines (97 loc) · 5.25 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<meta name="description" content="Myfocus : myFocus JavaScript Library" />
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<title>myFocus</title>
</head>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="https://github.com/koen301/myfocus">View on GitHub</a>
<h1 id="project_title">myFocus</h1>
<h2 id="project_tagline">myFocus JavaScript Library</h2>
<section id="downloads">
<a class="zip_download_link" href="https://github.com/koen301/myfocus/zipball/master">Download this project as a .zip file</a>
<a class="tar_download_link" href="https://github.com/koen301/myfocus/tarball/master">Download this project as a tar.gz file</a>
</section>
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<h1>
<a name="myfocus-v204" class="anchor" href="#myfocus-v204"><span class="octicon octicon-link"></span></a>myFocus v2.0.4</h1>
<p>myFocus是一个专注于WEB端焦点图/轮换图的JS库</p>
<h2>
<a name="%E7%89%B9%E7%82%B9" class="anchor" href="#%E7%89%B9%E7%82%B9"><span class="octicon octicon-link"></span></a>特点</h2>
<ul>
<li>原生JS编写,独立无依赖</li>
<li>性能卓越,同样效果比jQuery更流畅</li>
<li>简单易用,傻瓜式API和标准HTML结构</li>
<li>效果华丽,媲美Flash焦点图</li>
<li>功能强大,30多种风格切换,支持N种常用设置</li>
<li>体积小巧,仅5.93KB(minified & gzipped)</li>
<li>支持 IE6+ / Chrome / Firefox 等现代浏览器</li>
<li>支持自定义开发扩展</li>
</ul><h2>
<a name="%E7%94%A8%E6%B3%95" class="anchor" href="#%E7%94%A8%E6%B3%95"><span class="octicon octicon-link"></span></a>用法</h2>
<h4>
<a name="html" class="anchor" href="#html"><span class="octicon octicon-link"></span></a>HTML:</h4>
<pre><code><!-- 焦点图盒子 -->
<div id="boxID">
<!-- 载入中的Loading图片(可选) -->
<div class="loading"><img src="img/loading.gif" alt="请稍候..." /></div>
<!-- 内容列表 -->
<div class="pic">
<ul>
<li><a href="#"><img src="img/1.jpg" alt="标题1" /></a></li>
<li><a href="#"><img src="img/2.jpg" alt="标题2" /></a></li>
<li><a href="#"><img src="img/3.jpg" alt="标题3" /></a></li>
<li><a href="#"><img src="img/4.jpg" alt="标题4" /></a></li>
<li><a href="#"><img src="img/5.jpg" alt="标题5" /></a></li>
<!-- 你可以根据需要添加更多的列 -->
</ul>
</div>
</div>
</code></pre>
<h4>
<a name="js" class="anchor" href="#js"><span class="octicon octicon-link"></span></a>JS:</h4>
<pre><code>myFocus.set({id: 'boxID'});
</code></pre>
<p><a href="http://koen301.github.io/myfocus/demo/base.html">查看效果>> </a></p>
<p>当然,你可以使用更多自定义的设置,例如:</p>
<pre><code>myFocus.set({
id: 'boxID',//焦点图盒子ID
pattern: 'mF_tbhuabao',//焦点图风格的名称
time: 3,//切换时间间隔(秒)
trigger: 'mouseover',//触发切换模式:'click'(点击)/'mouseover'(悬停)
delay: 200,//'mouseover'模式下的切换延迟(毫秒)
txtHeight: 'default'//标题高度设置(像素),'default'为默认CSS高度,0为隐藏
});
</code></pre>
<p><a href="http://koen301.github.io/myfocus/demo/custom.html">查看效果>> </a></p>
<p>更多效果/详细用法/API,请参考<a href="http://www.baidu.com/s?wd=myfocus">百度“myfocus”>></a>。</p>
<h2>
<a name="%E4%B8%8B%E8%BD%BD" class="anchor" href="#%E4%B8%8B%E8%BD%BD"><span class="octicon octicon-link"></span></a>下载</h2>
<p>请到 <a href="https://github.com/koen301/myfocus/tree/gh-pages/dist">dist</a> 目录下载 myfocus 的min版(压缩)或full版(无压缩),并在子目录“mf-pattern”选择风格下载。</p>
<p>注意:myfocus 运行时会自动寻找其子目录“mf-pattern”下相应的风格文件,所以“mf-pattern”文件夹一定要存在。</p>
<p><a href="http://koen301.github.io/myfocus/pack/myfocus.zip">打包下载 myfocus 及它的所有风格文件>></a></p>
<h2>
<a name="%E7%89%88%E6%9C%AC--%E9%97%AE%E9%A2%98" class="anchor" href="#%E7%89%88%E6%9C%AC--%E9%97%AE%E9%A2%98"><span class="octicon octicon-link"></span></a>版本 & 问题</h2>
<p>myFocus从v2.0.4开始转移到github,后续版本(如果有)也会在这里更新。</p>
<p>相关问题欢迎在<a href="https://github.com/koen301/myfocus/issues">Issues</a>中提出。</p>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p class="copyright">Myfocus maintained by <a href="https://github.com/koen301">koen301</a></p>
<p>Published with <a href="http://pages.github.com">GitHub Pages</a></p>
</footer>
</div>
</body>
</html>