Swiper demo"/><meta property="og:local" content="zh-tw"> <meta property="og:title" content="Swiper輪播圖原始碼分享解析-html教學-PHP中文網"> <meta property="og:description" content="今天咱們來說一下.Swiper輪播圖.超級簡單的:翠花,上代碼: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title> Swiper demo"> <meta property="og:url" content="https://m.php.cn/zh-tw/faq/370599.html"> <meta property="og:image" content="https://m.php.cn/static/images/logo.png"> <meta property="og:site_name" content="php.cn"> <meta property="og:type" content="website"> <link rel="canonical" href="https://m.php.cn/zh-tw/faq/370599.html"/> <link rel="alternate" hrefLang="zh-cn" href="https://m.php.cn/zh/faq/370599.html" /> <link rel="alternate" hrefLang="en" href="https://m.php.cn/faq/370599.html" /> <link rel="alternate" hrefLang="zh-tw" href="https://m.php.cn/zh-tw/faq/370599.html" /> <link rel="alternate" hrefLang="ja" href="https://m.php.cn/ja/faq/370599.html" /> <link rel="alternate" hrefLang="ko" href="https://m.php.cn/ko/faq/370599.html" /> <link rel="alternate" hrefLang="ms" href="https://m.php.cn/ms/faq/370599.html" /> <link rel="alternate" hrefLang="fr" href="https://m.php.cn/fr/faq/370599.html" /> <link rel="alternate" hrefLang="de" href="https://m.php.cn/de/faq/370599.html" /> <meta charset="utf-8" /><meta name=viewport content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><meta name="applicable-device" content="mobile" /><link rel="stylesheet" href="/static/css/style.css?4.5.31"><link href="/static/front/mobcss/newphpcommon.css?1.1" type="text/css" rel="stylesheet"/><link href="/static/front/mobcss/swiper.min.css" type="text/css" rel="stylesheet"/><link href="/static/front/mobcss/newphp.css?1.2" type="text/css" rel="stylesheet"/><link href="/static/css/global.css" type="text/css" rel="stylesheet"/><link href="/static/layui/css/layui.css" type="text/css" rel="stylesheet"/><link href="/static/mobcss/mobindex3.css" type="text/css" rel="stylesheet"/><script src="/static/front/mobjs/jquery-1.6.1.min.js"></script><script src="/static/front/mobjs/swiper.min.js"></script><script src="/static/front/mobjs/newphpcommon.js"></script><script> var canshu = { SeeMore:'看更多', FoldUp:'折起來', Choice:'語言', wait:'正在加載,請稍候~', LoginFirst:"請先登入", needKeyword:'輸入關鍵字搜尋', emailPhoneError:'請輸入正確的電話或電子郵件地址', missPwd:'請輸入密碼', emailError:'請輸入您正確的電子郵件地址', VerCode:"請輸入驗證碼", getCode:'傳送', pwdError:'密碼格式不正確', TwoPassNotMatch:'兩個密碼不匹配', Bindemail:'綁定信箱', resetpassword:'重新設密碼', ConfirmPass:'確認密碼', pwdCheck:'請輸入6-18個字母或數字', Editinfor: '編輯個人資訊', trimContent:'請輸入內容', titleCheck:'標題長度應至少為 5 個字', choiceLang:'請選擇語言分類', Secondreply:'回覆', NetWorkError:'網路錯誤,請稍後重試!', all_lang_string:'zh|en|zh-tw|ja|ko|ms|fr|de' }; </script><!-- Google Tag Manager --><script> (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl; f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-WWVXRJPW'); </script><!-- End Google Tag Manager --><!-- Google tag (gtag.js) --><script async src="https://www.googletagmanager.com/gtag/js?id=G-H42EVCYBJC"></script><script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-H42EVCYBJC'); </script><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5902227090019525" crossorigin="anonymous"></script><!--<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6267705206177514" crossorigin="anonymous"></script>--><meta property="article:author" content="巴扎黑" /><meta property="article:published_first" content=",https://www.php.cn/faq/370599.html" /><link rel="stylesheet" href="/static/ueditor/third-party/SyntaxHighlighter/shCoreDefault.css?1"><link rel="stylesheet" href="/static/ueditor/third-party/SyntaxHighlighter/shCoreDefault1.css"><link href="/static/mobcss/newphp.css" type="text/css" rel="stylesheet"/><script src="/static/ueditor/third-party/SyntaxHighlighter/shCore.js"></script><script> var xnb_name = 'Virtual currency'; </script><script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","headline":"Swiper輪播圖原始碼分享解析","description":"今天咱們來說一下.Swiper輪播圖.超級簡單的:翠花,上代碼: <!DOCTYPE html> <html lang=\"en\"> <head> <meta charset=\"utf-8\"> <title> Swiper demo","datePublished":"2018-05-28T17:04:48+8:00","author":{"url":"http:\/\/m.php.cn\/zh-tw\/member\/7.html","name":"巴扎黑"},"mainEntityOfPage":{"@type":"WebPage","@id":"https:\/\/m.php.cn\/zh-tw\/faq\/370599.html"},"url":"https:\/\/m.php.cn\/zh-tw\/faq\/370599.html","articleBody":"<p>#le<pre class=\"brush:css;toolbar:false\"><br><\/pre><pre class=\"brush:html;toolbar:false\"><!DOCTYPE html><\/pre><pre class=\"brush:html;toolbar:false\"><html lang=\"en\"><\/pre><pre class=\"brush:html;toolbar:false\"><head><\/pre><pre class=\"brush:html;toolbar:false\"><meta charset=\"utf-8\"><\/pre><pre class=\"brush:html;toolbar:false\"><title>Swiper demo<\/title><\/pre><pre class=\"brush:html;toolbar:false\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1\"><\/pre>rr.<\/p>\n<h1><\/h1>超級簡單的:<h3><\/h3>ereee<pre class=\"brush:html;toolbar:false\"><!-- Link Swiper's CSS --><\/pre><pre class=\"brush:html;toolbar:false\"><link rel=\"stylesheet\" href=\"..\/dist\/css\/swiper.min.css?1.1.11\"><\/pre><pre class=\"brush:html;toolbar:false\"><!-- Demo styles --><\/pre><pre class=\"brush:html;toolbar:false\"><style><\/pre><pre class=\"brush:html;toolbar:false\">html, body {<\/pre><pre class=\"brush:html;toolbar:false\">position: relative;<\/pre><pre class=\"brush:html;toolbar:false\">height: 100%;<\/pre><pre class=\"brush:html;toolbar:false\">}<\/pre><pre class=\"brush:html;toolbar:false\">body {<\/pre>rrree reee<pre class=\"brush:html;toolbar:false\">background: #eee;<\/pre><pre class=\"brush:html;toolbar:false\">font-family: Helvetica Neue, Helvetica, Arial, sans-serif;<\/pre><pre class=\"brush:html;toolbar:false\">font-size: 14px;<\/pre><pre class=\"brush:html;toolbar:false\">color:#000;<\/pre><pre class=\"brush:html;toolbar:false\">margin: 0;<\/pre><pre class=\"brush:html;toolbar:false\">padding: 0;<\/pre><pre class=\"brush:html;toolbar:false\">}<\/pre><pre class=\"brush:html;toolbar:false\">.swiper-container {<\/pre><pre class=\"brush:html;toolbar:false\">width: 100%;<\/pre><pre class=\"brush:html;toolbar:false\">height: 100%;<\/pre><pre class=\"brush:html;toolbar:false\">}<\/pre><pre class=\"brush:html;toolbar:false\">.swiper-slide {<\/pre><pre class=\"brush:html;toolbar:false\">text-align: center;<\/pre><pre class=\"brush:html;toolbar:false\">font-size: 18px;<\/pre><pre class=\"brush:html;toolbar:false\">background: #fff;<\/pre><pre class=\"brush:html;toolbar:false\">\/* Center slide text vertically *\/<\/pre><pre class=\"brush:html;toolbar:false\">display: -webkit-box;<\/pre><pre class=\"brush:html;toolbar:false\">display: -ms-flexbox;<\/pre><pre class=\"brush:html;toolbar:false\">display: -webkit-flex;<\/pre><pre class=\"brush:html;toolbar:false\">display: flex;<\/pre><pre class=\"brush:html;toolbar:false\">-webkit-box-pack: center;<\/pre><pre class=\"brush:html;toolbar:false\">-ms-flex-pack: center;<\/pre><pre class=\"brush:html;toolbar:false\">-webkit-justify-content: center;<\/pre><pre class=\"brush:html;toolbar:false\">justify-content: center;<\/pre><pre class=\"brush:html;toolbar:false\">-webkit-box-align: center;<\/pre><pre class=\"brush:html;toolbar:false\">-ms-flex-align: center;<\/pre><pre class=\"brush:html;toolbar:false\">-webkit-align-items: center;<\/pre><pre class=\"brush:html;toolbar:false\">align-items: center;<\/pre><pre class=\"brush:html;toolbar:false\">}<\/pre><pre class=\"brush:html;toolbar:false\"><\/style><\/pre><pre class=\"brush:html;toolbar:false\"><\/head><\/pre>rr東西之前要先引Swiper.css和Swiper.js插件哦!<p><\/p>"}</script></head><body><div class="bodyBg"><!--头部--><div class="nphpHead"><div class="nphpTop"><div class="nphpTopIn"><div class="nphpLogo"><a href="http://m.php.cn/zh-tw/" title="PHP中文網"></a></div><div class="nphpSubmit"><!-- <a href="http://m.php.cn/zh-tw/search" class="bg1"></a> --><div class="langadivs" ><a href="javascript:;" class="bg4 bglanguage"></a><div class="langadiv" ><a onclick="javascript:setlang('zh-cn');" class="language course-right-orders chooselan " href="javascript:;"><span>简体中文</span><span>(ZH-CN)</span></a><a onclick="javascript:setlang('en');" class="language course-right-orders chooselan " href="javascript:;"><span>English</span><span>(EN)</span></a><a onclick="javascript:;" class="language course-right-orders chooselan chooselanguage" href="javascript:;"><span>繁体中文</span><span>(ZH-TW)</span></a><a onclick="javascript:setlang('ja');" class="language course-right-orders chooselan " href="javascript:;"><span>日本語</span><span>(JA)</span></a><a onclick="javascript:setlang('ko');" class="language course-right-orders chooselan " href="javascript:;"><span>한국어</span><span>(KO)</span></a><a onclick="javascript:setlang('ms');" class="language course-right-orders chooselan " href="javascript:;"><span>Melayu</span><span>(MS)</span></a><a onclick="javascript:setlang('fr');" class="language course-right-orders chooselan " href="javascript:;"><span>Français</span><span>(FR)</span></a><a onclick="javascript:setlang('de');" class="language course-right-orders chooselan " href="javascript:;"><span>Deutsch</span><span>(DE)</span></a></div></div><a href="http://m.php.cn/zh-tw/login" class="bg3"></a></div></div></div><div class="nphpNav"><div class="nphpNavIn"><div class="swiper-container nphpNavSwiper"><div class="swiper-wrapper"><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/" >首頁</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/article.html" class="hover">文章</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/wenda.html" >問答</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/course.html" >課程</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/faq/zt" >專題</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/xiazai" >下載</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/game" >遊戲</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/dic.html" >詞典</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/update/article_0_1.html" >最近更新</a></div><div class="clear"></div></div></div><script> var swiper = new Swiper('.nphpNavSwiper', { slidesPerView : 'auto' }); </script></div></div></div><!--头部 end--><div class="bodyMain"><!--所在位置--><div class="nphpSize"><div class="nphpSizeIn"><b></b><p><a href="http://m.php.cn/zh-tw/" title="首頁" class="bBlack">首頁</a>  >  <a href="http://m.php.cn/zh-tw/article.html" title="文章" class="bBlack">文章</a>  >  <a href="http://m.php.cn/zh-tw/web-designer.html" class="cBlack">web前端</a>  >  Swiper輪播圖原始碼分享解析</p><!-- <p><a href="http://m.php.cn/zh-tw/article.html" class="cBlack">科技文章</a>  >  <a href="http://m.php.cn/zh-tw/web-designer.html" class="cBlack">web前端</a> > <a href="http://m.php.cn/zh-tw/div-tutorial.html" class="cBlack">html教學</a> > Swiper輪播圖原始碼分享解析</p> --><div class="clear"></div></div></div><div class="nphpQianBox"><div class="nphpQianTitle"><h1>Swiper輪播圖原始碼分享解析</h1><div class="nphpQianTitleIn"><span><img data-src="/static/images/user_avatar.jpg" alt="巴扎黑" class="lazyload" src="/static/front/mobimages/moren/moren.png" /></span><dl><dt><em>巴扎黑</em><i class='bg1'>原創</i><div class="clear"></div></dt><dd><em>2018-05-28 17:04:48</em><i>4595瀏覽</i><div class="clear"></div></dd></dl><div class="clear"></div></div></div><div class="nphpQianCont wenda-list"><p>#le<pre class="brush:css;toolbar:false"><br></pre><pre class="brush:html;toolbar:false"><!DOCTYPE html></pre><pre class="brush:html;toolbar:false"><html lang="en"></pre><pre class="brush:html;toolbar:false"><head></pre><pre class="brush:html;toolbar:false"><meta charset="utf-8"></pre><pre class="brush:html;toolbar:false"><title>Swiper demo</title></pre><pre class="brush:html;toolbar:false"><meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"></pre>rr.</p> <h1></h1>超級簡單的:<h3></h3>ereee<pre class="brush:html;toolbar:false"><!-- Link Swiper&#39;s CSS --></pre><pre class="brush:html;toolbar:false"><link rel="stylesheet" href="../dist/css/swiper.min.css?1.1.11"></pre><pre class="brush:html;toolbar:false"><!-- Demo styles --></pre><pre class="brush:html;toolbar:false"><style></pre><pre class="brush:html;toolbar:false">html, body {</pre><pre class="brush:html;toolbar:false">position: relative;</pre><pre class="brush:html;toolbar:false">height: 100%;</pre><pre class="brush:html;toolbar:false">}</pre><pre class="brush:html;toolbar:false">body {</pre>rrree reee<pre class="brush:html;toolbar:false">background: #eee;</pre><pre class="brush:html;toolbar:false">font-family: Helvetica Neue, Helvetica, Arial, sans-serif;</pre><pre class="brush:html;toolbar:false">font-size: 14px;</pre><pre class="brush:html;toolbar:false">color:#000;</pre><pre class="brush:html;toolbar:false">margin: 0;</pre><pre class="brush:html;toolbar:false">padding: 0;</pre><pre class="brush:html;toolbar:false">}</pre><pre class="brush:html;toolbar:false">.swiper-container {</pre><pre class="brush:html;toolbar:false">width: 100%;</pre><pre class="brush:html;toolbar:false">height: 100%;</pre><pre class="brush:html;toolbar:false">}</pre><pre class="brush:html;toolbar:false">.swiper-slide {</pre><pre class="brush:html;toolbar:false">text-align: center;</pre><pre class="brush:html;toolbar:false">font-size: 18px;</pre><pre class="brush:html;toolbar:false">background: #fff;</pre><pre class="brush:html;toolbar:false">/* Center slide text vertically */</pre><pre class="brush:html;toolbar:false">display: -webkit-box;</pre><pre class="brush:html;toolbar:false">display: -ms-flexbox;</pre><pre class="brush:html;toolbar:false">display: -webkit-flex;</pre><pre class="brush:html;toolbar:false">display: flex;</pre><pre class="brush:html;toolbar:false">-webkit-box-pack: center;</pre><pre class="brush:html;toolbar:false">-ms-flex-pack: center;</pre><pre class="brush:html;toolbar:false">-webkit-justify-content: center;</pre><pre class="brush:html;toolbar:false">justify-content: center;</pre><pre class="brush:html;toolbar:false">-webkit-box-align: center;</pre><pre class="brush:html;toolbar:false">-ms-flex-align: center;</pre><pre class="brush:html;toolbar:false">-webkit-align-items: center;</pre><pre class="brush:html;toolbar:false">align-items: center;</pre><pre class="brush:html;toolbar:false">}</pre><pre class="brush:html;toolbar:false"></style></pre><pre class="brush:html;toolbar:false"></head></pre>rr東西之前要先引Swiper.css和Swiper.js插件哦!<p></p><p>以上是Swiper輪播圖原始碼分享解析的詳細內容。更多資訊請關注PHP中文網其他相關文章!</p></div><div class="nphpQianMsg"><div class="clear"></div></div><div class="nphpQianSheng"><span>陳述:</span><div>本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn</div></div></div><div class="nphpSytBox"><span>上一篇:<a class="dBlack" title="CSS3倒影實例教程" href="http://m.php.cn/zh-tw/faq/370598.html">CSS3倒影實例教程</a></span><span>下一篇:<a class="dBlack" title="CSS3倒影實例教程" href="http://m.php.cn/zh-tw/faq/370600.html">CSS3倒影實例教程</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>相關文章</h2><em><a href="http://m.php.cn/zh-tw/article.html" class="bBlack"><i>看更多</i><b></b></a></em><div class="clear"></div></div><ul class="nphpXgwzList"><li><b></b><a href="http://m.php.cn/zh-tw/faq/348757.html" title="Html小知識總結" class="aBlack">Html小知識總結</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/zh-tw/faq/348804.html" title="如何快速學習HTML" class="aBlack">如何快速學習HTML</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/zh-tw/faq/348873.html" title="html xhtml xml的區別" class="aBlack">html xhtml xml的區別</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/zh-tw/faq/348884.html" title="src與href屬性的差別" class="aBlack">src與href屬性的差別</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/zh-tw/faq/348902.html" title="關於HTML5和CSS替換使用" class="aBlack">關於HTML5和CSS替換使用</a><div class="clear"></div></li></ul></div></div><div class="nphpFoot"><div class="nphpFootBg"><ul class="nphpFootMenu"><li><a href="http://m.php.cn/zh-tw/"><b class="icon1"></b><p>首頁</p></a></li><li><a href="http://m.php.cn/zh-tw/course.html"><b class="icon2"></b><p>課程</p></a></li><li><a href="http://m.php.cn/zh-tw/wenda.html"><b class="icon4"></b><p>問答</p></a></li><li><a href="http://m.php.cn/zh-tw/login"><b class="icon5"></b><p>我的</p></a></li><div class="clear"></div></ul></div></div><div class="nphpYouBox" style="display: none;"><div class="nphpYouBg"><div class="nphpYouTitle"><span onclick="$('.nphpYouBox').hide()"></span><a href="http://m.php.cn/zh-tw/"></a><div class="clear"></div></div><ul class="nphpYouList"><li><a href="http://m.php.cn/zh-tw/"><b class="icon1"></b><span>首頁</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/course.html"><b class="icon2"></b><span>課程</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/article.html"><b class="icon3"></b><span>文章</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/wenda.html"><b class="icon4"></b><span>問答</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/dic.html"><b class="icon6"></b><span>詞典</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/course/type/99.html"><b class="icon7"></b><span>手册</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/xiazai/"><b class="icon8"></b><span>下載</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/zh-tw/faq/zt" title="專題"><b class="icon12"></b><span>專題</span><div class="clear"></div></a></li><div class="clear"></div></ul></div></div><div class="nphpDing" style="display: none;"><div class="nphpDinglogo"><a href="http://m.php.cn/zh-tw/"></a></div><div class="nphpNavIn1"><div class="swiper-container nphpNavSwiper1"><div class="swiper-wrapper"><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/" >首頁</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/article.html" class="hover">文章</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/wenda.html" >問答</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/course.html" >課程</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/faq/zt" >專題</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/xiazai" >下載</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/game" >遊戲</a></div><div class="swiper-slide"><a href="http://m.php.cn/zh-tw/dic.html" >詞典</a></div><div class="clear"></div></div></div><div class="langadivs" ><a href="javascript:;" class="bg4 bglanguage"></a><div class="langadiv" ><a onclick="javascript:setlang('zh-cn');" class="language course-right-orders chooselan " href="javascript:;"><span>简体中文</span><span>(ZH-CN)</span></a><a onclick="javascript:setlang('en');" class="language course-right-orders chooselan " href="javascript:;"><span>English</span><span>(EN)</span></a><a onclick="javascript:;" class="language course-right-orders chooselan chooselanguage" href="javascript:;"><span>繁体中文</span><span>(ZH-TW)</span></a><a onclick="javascript:setlang('ja');" class="language course-right-orders chooselan " href="javascript:;"><span>日本語</span><span>(JA)</span></a><a onclick="javascript:setlang('ko');" class="language course-right-orders chooselan " href="javascript:;"><span>한국어</span><span>(KO)</span></a><a onclick="javascript:setlang('ms');" class="language course-right-orders chooselan " href="javascript:;"><span>Melayu</span><span>(MS)</span></a><a onclick="javascript:setlang('fr');" class="language course-right-orders chooselan " href="javascript:;"><span>Français</span><span>(FR)</span></a><a onclick="javascript:setlang('de');" class="language course-right-orders chooselan " href="javascript:;"><span>Deutsch</span><span>(DE)</span></a></div></div><script> var swiper = new Swiper('.nphpNavSwiper1', { slidesPerView : 'auto', observer: true,//修改swiper自己或子元素时,自动初始化swiper observeParents: true,//修改swiper的父元素时,自动初始化swiper }); </script></div></div><!--顶部导航 end--><script>isLogin = 0;</script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></script></div><script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script><link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css' type='text/css' media='all'/><script type='text/javascript' src='/static/js/viewer.min.js?1'></script><script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script><script>jQuery.fn.wait = function (func, times, interval) { var _times = times || -1, //100次 _interval = interval || 20, //20毫秒每次 _self = this, _selector = this.selector, //选择器 _iIntervalID; //定时器id if( this.length ){ //如果已经获取到了,就直接执行函数 func && func.call(this); } else { _iIntervalID = setInterval(function() { if(!_times) { //是0就退出 clearInterval(_iIntervalID); } _times <= 0 || _times--; //如果是正数就 -- _self = $(_selector); //再次选择 if( _self.length ) { //判断是否取到 func && func.call(_self); clearInterval(_iIntervalID); } }, _interval); } return this; } $("table.syntaxhighlighter").wait(function() { $('table.syntaxhighlighter').append("<p class='cnblogs_code_footer'><span class='cnblogs_code_footer_icon'></span></p>"); }); $(document).on("click", ".cnblogs_code_footer",function(){ $(this).parents('table.syntaxhighlighter').css('display','inline-table');$(this).hide(); }); $('.nphpQianCont').viewer({navbar:true,title:false,toolbar:false,movable:false,viewed:function(){$('img').click(function(){$('.viewer-close').trigger('click');});}}); </script></body></html>