武安信息亭 發表於 2020-3-2 08:59:28

DZ!X4 PC版自适应代码

<br /><font size="4"><font color="#0000ff"><strong>将以下代码放到后台统计代码里即可 (代码由作者:LisenH提供):</strong></font></font><br /><ol><li>&lt;script src=&quot;https://cdn.bootcss.com/jquery/3.4.1/jquery.slim.min.js&quot;&gt;&lt;/script&gt;<br /><li>&lt;script&gt;var jq = jQuery.noConflict();&lt;/script&gt;<br /><li>&lt;script&gt;<br /><li>&nbsp;&nbsp;jq(document).ready(function () {<br /><li>&nbsp; &nbsp; jq(&quot;head&quot;).append('&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,initial-scale=1,user-scalable=0&quot;&gt;')<br /><li>&nbsp; &nbsp; jq(&quot;head&quot;).append('&lt;style&gt;.tedt{width:100% !important; max-width:600px}&lt;/style&gt;')<br /><li>&nbsp; &nbsp; jq(&quot;head&quot;).append('&lt;style&gt;.quote{width:100% !important}&lt;/style&gt;')<br /><li>&nbsp; &nbsp; jq(&quot;#toptb&quot;).css(&quot;min-width&quot;, &quot;0&quot;)<br /><li>&nbsp; &nbsp; jq(&quot;.hdc.cl&quot;).css(&quot;min-height&quot;, &quot;0&quot;)<br /><li>&nbsp; &nbsp; jq(&quot;.wp&quot;).css(&quot;min-width&quot;, &quot;0&quot;)<br /><li>&nbsp; &nbsp; jq(&quot;.zoom&quot;).css(&quot;width&quot;, &quot;100%&quot;)<br /><li>&nbsp; &nbsp; jq(&quot;.zoom&quot;).css(&quot;max-width&quot;, &quot;600px&quot;)<br /><li>&nbsp; &nbsp; jq(&quot;.attach_nopermission.attach_tips&quot;).css(&quot;width&quot;, &quot;100%&quot;)<br /><li>&nbsp; &nbsp; jq(&quot;.attach_nopermission.attach_tips&quot;).css(&quot;max-width&quot;, &quot;600px&quot;)<br /><li>&nbsp; &nbsp; jq(&quot;.tedt.mtn&quot;).css(&quot;width&quot;, &quot;100%&quot;)<br /><li>&nbsp; &nbsp; jq(&quot;.tedt.mtn&quot;).css(&quot;max-width&quot;, &quot;600px&quot;)<br /><li>&nbsp; &nbsp; resized()<br /><li>&nbsp;&nbsp;})<br /><li>&nbsp;&nbsp;window.addEventListener(&quot;resize&quot;, resized)<br /><li>&nbsp;&nbsp;function resized() {<br /><li>&nbsp; &nbsp; if (jq(document).width() &lt;= 650) {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#online&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#qmenu&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#um&quot;).children(&quot;p:eq(1)&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#um&quot;).css(&quot;padding-right&quot;, &quot;0&quot;)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#scbar_txt&quot;).css(&quot;width&quot;, &quot;calc(100vw - 145px)&quot;)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.scbar_hot_td&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.fl_i&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.fl_by&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.hdc.cl&quot;).children(&quot;h2&quot;).children(&quot;a&quot;).children(&quot;img&quot;).css(&quot;height&quot;, &quot;32px&quot;)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#chart&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#loginstatus&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.avt.y&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.y.pns&quot;).children(&quot;table&quot;).children(&quot;tbody&quot;).children(&quot;tr:eq(0)&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.y.pns&quot;).children(&quot;table&quot;).children(&quot;tbody&quot;).children(&quot;tr:eq(1)&quot;).children(&quot;td:eq(0)&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.y.pns&quot;).children(&quot;table&quot;).children(&quot;tbody&quot;).children(&quot;tr:eq(1)&quot;).children(&quot;td:eq(1)&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#frt&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.by&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.num&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.bm_h.cl&quot;).children(&quot;.y&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#toptb&quot;).children(&quot;.wp&quot;).children(&quot;.y&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.pls&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#fj&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#fastsmiliesdiv&quot;).hide()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#fastposteditor&quot;).css(&quot;margin-right&quot;, &quot;0&quot;)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#p_btn&quot;).hide()<br /><li>&nbsp; &nbsp; } else {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#online&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#qmenu&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#um&quot;).children(&quot;p:eq(1)&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#um&quot;).css(&quot;padding-right&quot;, &quot;60px&quot;)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#scbar_txt&quot;).css(&quot;width&quot;, &quot;400px&quot;)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.scbar_hot_td&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.fl_i&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.fl_by&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.hdc.cl&quot;).children(&quot;h2&quot;).children(&quot;a&quot;).children(&quot;img&quot;).css(&quot;height&quot;, &quot;66px&quot;)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.pipe&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#chart&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#loginstatus&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.avt.y&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.y.pns&quot;).children(&quot;table&quot;).children(&quot;tbody&quot;).children(&quot;tr:eq(0)&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.y.pns&quot;).children(&quot;table&quot;).children(&quot;tbody&quot;).children(&quot;tr:eq(1)&quot;).children(&quot;td:eq(0)&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.y.pns&quot;).children(&quot;table&quot;).children(&quot;tbody&quot;).children(&quot;tr:eq(1)&quot;).children(&quot;td:eq(1)&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#frt&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.by&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.num&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.bm_h.cl&quot;).children(&quot;.y&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#toptb&quot;).children(&quot;.wp&quot;).children(&quot;.y&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;.pls&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#fj&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#fastsmiliesdiv&quot;).show()<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#fastposteditor&quot;).css(&quot;margin-right&quot;, &quot;170px&quot;)<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;jq(&quot;#p_btn&quot;).show()<br /><li>&nbsp; &nbsp; }<br /><li>&nbsp;&nbsp;}<br /><li>&lt;/script&gt;</ol><strong><font color="#ff0000">如果觉得以上代码实用,</font></strong><strong>请关注</strong><br /><strong>《</strong><strong>青年摄影网</strong><strong>——www.qnsyw.com》</strong><br /><br />代码<em>, </em>size<em>, </em>以下<em>, </em>放到

jeeke 發表於 2020-3-2 15:13:17

作用是什么呢?http://www.ximanni.cn/放了没看出变化

武安信息亭 發表於 2020-3-2 23:20:35

<br />电脑版自适应

acgi 發表於 2020-3-7 13:30:55

这jq用的可真胡闹

武安信息亭 發表於 2020-3-7 13:42:22

<br />那你弄个不胡闹的

武安信息亭 發表於 2020-3-11 13:32:24

<br />你把手机版关闭 就知道效果了

学无止境it 發表於 2020-4-9 21:02:23

留言标记一下&nbsp;&nbsp;备用,感觉可以

wonderful 發表於 2020-4-11 09:15:32

看看我的网站,DZ做的,自适应,https://www.khaoshu.com/

学无止境it 發表於 2020-6-25 14:05:18

标记一下不知道啥时候就用到了

jndaoye 發表於 2020-8-20 16:48:20

是放在第三方统计里面吗,手机版已经关闭,我的是3.4,没用哦,
頁: [1]
查看完整版本: DZ!X4 PC版自适应代码