侠外游戏论坛
标题:
Discuz! X3.4网页默认模板自适应屏幕分辨率的方法
[打印本页]
作者:
匿名
时间:
2020-11-7 10:05
标题:
Discuz! X3.4网页默认模板自适应屏幕分辨率的方法
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"><script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.slim.min.js"></script></span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"><script>var jq = jQuery.noConflict();</script></span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"><script></span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(document).ready(function () {</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("head").append('<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">')</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("head").append('<style>.tedt{width:100% !important; max-width:600px}</style>')</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("head").append('<style>.quote{width:100% !important}</style>')</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#toptb").css("min-width", "0")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".hdc.cl").css("min-height", "0")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".wp").css("min-width", "0")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".zoom").css("width", "100%")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".zoom").css("max-width", "600px")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".attach_nopermission.attach_tips").css("width", "100%")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".attach_nopermission.attach_tips").css("max-width", "600px")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".tedt.mtn").css("width", "100%")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".tedt.mtn").css("max-width", "600px")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#scrolltop").children("span:eq(0)").children("a").attr("onclick", "void(0)")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> resized()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> })</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> window.addEventListener("resize", resized)</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> function resized() {</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> if (jq(document).width() <= 650) {</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#online").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#qmenu").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#um").children("p:eq(1)").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#um").css("padding-right", "0")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#scbar_txt").css("width", "calc(100vw - 145px)")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".scbar_hot_td").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".fl_i").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".fl_by").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".hdc.cl").children("h2").children("a").children("img").css("height", "32px")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#chart").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#loginstatus").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".avt.y").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".y.pns").children("table").children("tbody").children("tr:eq(0)").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".y.pns").children("table").children("tbody").children("tr:eq(1)").children("td:eq(0)").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".y.pns").children("table").children("tbody").children("tr:eq(1)").children("td:eq(1)").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#frt").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".by").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".num").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".bm_h.cl").children(".y").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#toptb").children(".wp").children(".y").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".pls").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#fj").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#fastsmiliesdiv").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#fastposteditor").css("margin-right", "0")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#p_btn").hide()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> } else {</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#online").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#qmenu").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#um").children("p:eq(1)").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#um").css("padding-right", "60px")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#scbar_txt").css("width", "400px")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".scbar_hot_td").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".fl_i").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".fl_by").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".hdc.cl").children("h2").children("a").children("img").css("height", "66px")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".pipe").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#chart").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#loginstatus").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".avt.y").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".y.pns").children("table").children("tbody").children("tr:eq(0)").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".y.pns").children("table").children("tbody").children("tr:eq(1)").children("td:eq(0)").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".y.pns").children("table").children("tbody").children("tr:eq(1)").children("td:eq(1)").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#frt").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".by").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".num").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".bm_h.cl").children(".y").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#toptb").children(".wp").children(".y").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq(".pls").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#fj").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#fastsmiliesdiv").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#fastposteditor").css("margin-right", "170px")</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> jq("#p_btn").show()</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> }</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"> }</span>
<span style="font-family: Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px;"></script></span>
复制代码
欢迎光临 侠外游戏论坛 (https://bbs.xiawai.com/)
Powered by Discuz! X3