分享一個自己寫的簡單的jquery litebox遮罩層插件,直接加class liteBox調用, 有加載進度條,在鏈接中設置寬度、高度和是否有滾動條!js壓縮代碼1.4k
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>demo</title><style>body {width:100%;height:100%;}*{margin:0;padding:0;}#lite-overlay {position:fixed;width:100%;height:100%;top:0;left:0;background-color:#000;filter:alpha(opacity=75);-moz-opacity: 0.75;opacity: 0.75;}*html #lite-overlay {position:absolute;}.liteTitle {height:30px;line-height:30px;text-indent:12px;font-size:12px;font-weight:bold;background:#F5F8FA;position:relative;}.liteClose {height:30px;line-height:30px;cursor:pointer;position:absolute;right:15px;top:0;font-size:12px;}#lite-content {background:#fff;position:fixed;top:50%;left:50%;z-index:100;display:none;}*html #lite-content {position:absolute;}/*-- loading --*/#liteloading {position:absolute;width:208px;height:13px;left:50%;top:50%;margin-left:-104px;margin-top:-6px;z-index:10000;background: url(/uploads/Common/images/loadingAnimation.gif) no-repeat;}</style><script src="http://www.vxbq.cn/uploads/Common/jquery-1.3.2.min.js" type="text/javascript"></script><script src="http://www.vxbq.cn/uploads/Common/litebox.jquery-min.js" type="text/javascript"></script></head><body><ul><li><a href="http://www.vxbq.cn?height=500&width=800&scroll=no" title="網" class="liteBox" >網</a></li><li><a href="http://blueidea.com?height=300&width=400&scroll=yes" title="藍色理想" class="liteBox" >藍色理想</a> </li><li><a href="http://www.vxbq.cn/uploads/Common/html/tanchu.html?height=300&width=500" class="liteBox" title="我是彈出框">我是彈出框</a> </li></ul></body></html><br /><center>如不能顯示效果,請按Ctrl+F5刷新本頁,更多網頁代碼:<a href='http://www.vxbq.cn/' target='_blank'>http://www.vxbq.cn/</a></center>提示:可修改后代碼再運行!
上一篇 駱騏:我是如何通過獸獸門日賺70美元的
下一篇 Javascript 中 while 循環用法的代碼
程序員人生,我編程,我富裕,記住wfuyu網,php教程,php學習,php手冊,CMS模版制作
聲明:本站大部分內容是作者原創,少部分收集于互聯網供大家一起學習,原版權很多不明,如有侵權請聯系本站,謝謝!
粵ICP備14040726號-1?? 2015-2020 程序員人生 版權所有