Permalink
Browse files

hebing

  • Loading branch information...
DrayChou committed Mar 9, 2012
1 parent ca23a89 commit 1e32f5ef754e0c138447c90a824c1932da41076a
Showing with 0 additions and 9 deletions.
  1. +0 −4 _posts/2011-05-12-webqq-js-code-in-the-adaptive-width.markdwon
  2. +0 −5 code_highlight.html
@@ -14,11 +14,7 @@ type: post
webqq 中 自适应宽度的JS代码
-<<<<<<< HEAD
-<div class="dp-highlighter"><div class="bar"><div class="tools"><b style="color:#000;">Code</b>&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" onclick="hero.codeRender.Commands['ViewSource'].func(this);return false;">View</a><a href="javascript:void(0);" onclick="hero.codeRender.Commands['PrintSource'].func(this);return false;">Print</a><a href="javascript:void(0);" onclick="hero.codeRender.Commands['About'].func(this);return false;"></a><input class="sourceCode" style="display:none;"></div></div><ol start="1" class="dp-c"><li class="alt"><span><span>&lt;script&nbsp;src=</span><span class="string">"http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"</span><span>&gt;&lt;/script&gt;&nbsp;&nbsp;</span></span></li><li class=""><span>&lt;script&nbsp;src=<span class="string">"http://web.qstatic.com/jsapi/alloy.api.js"</span><span>&gt;&lt;/script&gt;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&lt;script&nbsp;type=<span class="string">"text/javascript"</span><span>&gt;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">try</span><span>&nbsp;{&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alloy.onReady(<span class="keyword">function</span><span>(){&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span><span>($(</span><span class="vars">window</span><span>).width()&lt;1026){&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alloy.<span class="vars">window</span><span>.setBodySize({width:&nbsp;1026,height:&nbsp;$(</span><span class="vars">window</span><span>).height()})&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;}<span class="keyword">catch</span><span>(e){&nbsp;}&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;$(<span class="vars">window</span><span>).resize(</span><span class="keyword">function</span><span>(){&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">var</span><span>&nbsp;w&nbsp;=&nbsp;$(</span><span class="vars">window</span><span>).width();&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">var</span><span>&nbsp;h&nbsp;=&nbsp;$(</span><span class="vars">window</span><span>).height();&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(<span class="string">"#iyaya_iframe"</span><span>).css({&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width:&nbsp;w&gt;1026?w-16:1016,&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height:&nbsp;h,&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li></ol></div>
-=======
<div class="dp-highlighter"><div class="bar"></div><ol class="dp-c" start="1"><li class="alt"><span><span>&lt;script&nbsp;src=</span><span class="string">"http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"</span><span>&gt;&lt;/script&gt;&nbsp;&nbsp;</span></span></li><li class=""><span>&lt;script&nbsp;src=<span class="string">"http://web.qstatic.com/jsapi/alloy.api.js"</span><span>&gt;&lt;/script&gt;&nbsp;&nbsp;</span></span></li><li class="alt"><span>&lt;script&nbsp;type=<span class="string">"text/javascript"</span><span>&gt;&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">try</span><span>&nbsp;{&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alloy.onReady(<span class="keyword">function</span><span>(){&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span><span>($(</span><span class="vars">window</span><span>).width()&lt;1026){&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alloy.<span class="vars">window</span><span>.setBodySize({width:&nbsp;1026,height:&nbsp;$(</span><span class="vars">window</span><span>).height()})&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;}<span class="keyword">catch</span><span>(e){&nbsp;}&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;$(<span class="vars">window</span><span>).resize(</span><span class="keyword">function</span><span>(){&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">var</span><span>&nbsp;w&nbsp;=&nbsp;$(</span><span class="vars">window</span><span>).width();&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">var</span><span>&nbsp;h&nbsp;=&nbsp;$(</span><span class="vars">window</span><span>).height();&nbsp;&nbsp;</span></span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(<span class="string">"#iyaya_iframe"</span><span>).css({&nbsp;&nbsp;</span></span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width:&nbsp;w&gt;1026?w-16:1016,&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height:&nbsp;h,&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</span></li><li class=""><span>&lt;/script&gt;&nbsp;&nbsp;</span></li></ol></div>
->>>>>>> modify1
隐藏横向滚动条的方法:
<span style="color: #ff0000;">给 html 设置 overflow-x: hidden</span>
View
@@ -1,12 +1,7 @@
---
layout : page
-<<<<<<< HEAD
title : Code highlighting
tagline : 在线代码高亮
-=======
-title : js在线代码高亮
-tagline : js在线代码高亮
->>>>>>> modify1
header : codehighlight - 在线代码高亮 - Dray's Home
group : navigation
index : 3

0 comments on commit 1e32f5e

Please sign in to comment.