·设为首页收藏本站📧邮箱修改🎁免费下载专区🔐设置/修改密码👽群雄群聊
返回列表 发布新帖

DZ!X4 PC版自适应代码

378 8
发表于 2020-7-8 10:43:41 | 查看全部 阅读模式

马上注册,免费下载更多dz插件网资源。

您需要 登录 才可以下载或查看,没有账号?立即注册

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

评论8

IT618发布Lv.8 发表于 2020-7-8 10:44:37 | 查看全部
作用是什么呢?http://www.ximanni.cn/放了没看出变化
我要说一句 收起回复
IT618发布Lv.8 发表于 2020-7-8 10:45:17 | 查看全部
电脑版自适应
我要说一句 收起回复
拾光Lv.8 发表于 2020-7-8 10:45:53 | 查看全部
这jq用的可真胡闹
我要说一句 收起回复
TyCodingLv.8 发表于 2020-7-8 10:46:04 | 查看全部
那你弄个不胡闹的
我要说一句 收起回复
IT618发布Lv.8 发表于 2020-7-8 10:46:24 | 查看全部
你把手机版关闭 就知道效果了
我要说一句 收起回复
CrystαlLv.8 发表于 2020-7-8 10:46:37 | 查看全部
留言标记一下  备用,感觉可以
我要说一句 收起回复
CrystαlLv.8 发表于 2020-7-8 10:47:37 | 查看全部
看看我的网站,DZ做的,自适应,https://www.khaoshu.com/
我要说一句 收起回复
TyCodingLv.8 发表于 2020-7-8 10:48:07 | 查看全部
标记一下不知道啥时候就用到了
我要说一句 收起回复

回复

 懒得打字嘛,点击右侧快捷回复【查看最新发布】   【应用商城享更多资源】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

投诉/建议联系

discuzaddons@vip.qq.com

未经授权禁止转载,复制和建立镜像,
如有违反,按照公告处理!!!
  • 联系QQ客服
  • 添加微信客服

联系DZ插件网微信客服|最近更新|Archiver|手机版|小黑屋|DZ插件网! ( 鄂ICP备20010621号-1 )|网站地图

您的IP:3.138.85.72,42.81.98.52,GMT+8, 2024-5-15 05:14 , Processed in 0.261249 second(s), 155 queries , Gzip On, Redis On.

Based on Discuz! W1.0 Licensed

© 2001-2024 Discuz! Team.

关灯 在本版发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表