相思资源网 Design By www.200059.com
.THICKBOX支持一下浏览器:
Windows IE 6.0, Windows IE 7+, Windows FF 2.0.0.6+, Windows Opera 9.0+, Macintosh Safari 2.0.4+, Macintosh FF 2.0.0.6+, Macintosh Opera 9.10……但是据我的使用,IE6还是有点问题的!下面我们首先来看它的调用:
1.肯定你先要下载jquery.js和thickbox.js了.还有thickbox.css也不能少!
复制代码 代码如下:
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/thickbox.js"><link rel="stylesheet" href="path-to-file/thickbox.css" type="text/css" media="screen" />
//path-to-file 就是你放这三个文件的路径
2.弹出单张图片的方法:
复制代码 代码如下:
<a href="images/single.jpg" title="add a caption to title attribute / or leave blank" class="thickbox"><img src="/UploadFiles/2021-04-02/single_t.jpg">
3.多张图片实现分页也很简单:
复制代码 代码如下:
<a href="images/plant1.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="/UploadFiles/2021-04-02/plant1_t.jpg"><a href="images/plant2.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="/UploadFiles/2021-04-02/plant2_t.jpg"><a href="images/plant3.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="/UploadFiles/2021-04-02/plant3_t.jpg"><a href="images/plant4.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="/UploadFiles/2021-04-02/plant4_t.jpg">
4.弹出网页inLINECONTENT
复制代码 代码如下:
<input alt="#TB_inline?height=300&width=400&inlineId=myOnPageContent" title="add a caption to title attribute / or leave blank" class="thickbox" type="button" value="Show" />
//重要的是 #TB_inline?
5.iFRAME形式的
复制代码 代码如下:
<a href="ajax.PHP?keepThis=true&TB_iframe=true&height=250&width=400" title="add a caption to title attribute / or leave blank" class="thickbox">Example</a>
所有调用的样式都得加上class=”thickbox”.这是控制弹出的效果,具体可以参照JQUERY的官方站点对THICKBOX的介绍,里面有具体效果:http://jquery.com/demo/thickbox/
Windows IE 6.0, Windows IE 7+, Windows FF 2.0.0.6+, Windows Opera 9.0+, Macintosh Safari 2.0.4+, Macintosh FF 2.0.0.6+, Macintosh Opera 9.10……但是据我的使用,IE6还是有点问题的!下面我们首先来看它的调用:
1.肯定你先要下载jquery.js和thickbox.js了.还有thickbox.css也不能少!
复制代码 代码如下:
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.js"><script type="text/javascript" src="/UploadFiles/2021-04-02/thickbox.js"><link rel="stylesheet" href="path-to-file/thickbox.css" type="text/css" media="screen" />
//path-to-file 就是你放这三个文件的路径
2.弹出单张图片的方法:
复制代码 代码如下:
<a href="images/single.jpg" title="add a caption to title attribute / or leave blank" class="thickbox"><img src="/UploadFiles/2021-04-02/single_t.jpg">
3.多张图片实现分页也很简单:
复制代码 代码如下:
<a href="images/plant1.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="/UploadFiles/2021-04-02/plant1_t.jpg"><a href="images/plant2.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="/UploadFiles/2021-04-02/plant2_t.jpg"><a href="images/plant3.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="/UploadFiles/2021-04-02/plant3_t.jpg"><a href="images/plant4.jpg" title="add a caption to title attribute / or leave blank" class="thickbox" rel="gallery-plants"><img src="/UploadFiles/2021-04-02/plant4_t.jpg">
4.弹出网页inLINECONTENT
复制代码 代码如下:
<input alt="#TB_inline?height=300&width=400&inlineId=myOnPageContent" title="add a caption to title attribute / or leave blank" class="thickbox" type="button" value="Show" />
//重要的是 #TB_inline?
5.iFRAME形式的
复制代码 代码如下:
<a href="ajax.PHP?keepThis=true&TB_iframe=true&height=250&width=400" title="add a caption to title attribute / or leave blank" class="thickbox">Example</a>
所有调用的样式都得加上class=”thickbox”.这是控制弹出的效果,具体可以参照JQUERY的官方站点对THICKBOX的介绍,里面有具体效果:http://jquery.com/demo/thickbox/
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无JQUERY THICKBOX弹出层插件的评论...