Discuz! X3.4网页手机自适应代码

后台设置站点宽窄风格为“宽屏(自由宽度)”
将以下代码放到后台统计代码里:

  1. <script src=”https://cdn.bootcss.com/jquery/3.4.1/jquery.slim.min.js”></script\ 1 * ^ B I v + $>
  2. <script>var jq = jQuery.noConflict();</script&/ / J [gt;
  3. <script>
  4. jq(document).ready(function () {
  5. jq(“head”).append(‘r 9 w 3 ^ \ O 9<meta na\ # }me=”vi: Y M 6 ( L /ewpo1 7 c S \ i crt” content=”wH $ # l \ . 2 Aidth=device-width,initial-scale=1,user-scalable=0″>’)
  6. jq(“head”).append(‘<style>.tedt{width:100% !important; max-width:600px}</style>’)
  7. jq(“head”).append(‘<style>.quote{width:100% !imporz H `tant}</s@ \ 9 Qtyle>’)
  8. jq(“#toptb”s e I ? 8 P U).css(“min-width”, “0”)
  9. jq(“.hT ] z D U 2 ^dc.cl”).css(“min-height”, “0”)
  10. jq(“.wp”).cssn 4 k F W &(“min-width”, “0”)
  11. jq(“.zoom”).css(“width”, “100%”)
  12. jq(“.zoom”).csC 6 +s(“max-width”, “600px”)
  13. jq(“.attach_nopermission.attach_tips”).css(“width”, “100%”)
  14. jq(“.attach_nopermission.attach_tips”).css(“max-width”, “600px”V – O b 4 ~ z)
  15. jq(“.tedt.mtn”).css(“width”= l ] c a : a, “100%”)
  16. jq(“.tedt.mtn”).css(“max-width”, “600px”)
  17. jq(“u u u#scrolltop”).children(“span:eq(0)”).children(“a”).attr() s t“onclick”, “void(0)”)P * M ^ k
  18. resized()
  19. })
  20. window.adf @ N 2 O ( , .dEventListener(“resize”, resizeg k 6 ) o `d)
  21. funK k Z ) iction resized() {
  22. if (jq(document).width() <= 650) {
  23. jq(“#online”).h] f W N q q 4 Q =ide()
  24. jq(“#qmenu”).hide()$ l ]
  25. jq(“#um”).children(“p:eq(1)”).hide()
  26. jq(“#um”).css(“padding-right”, “0”)
  27. jq(“#scbarh y Y T ] M &_txt”).css(r H 5 Y =“width”, “calc(100vw – 145px)P Z X I b } Y u“)
  28. jq(“.scbar_hot_td”).hide()
  29. jq(“.fl_i”).hide()
  30. jq(“.fl_by”).` R bhide()
  31. jq(“.hdc.cl1 1 3 V 2 I“).children(“h2”).children(“a”).children(“img”).css(“height”, “32px”)
  32. jq(“H F s e#chart”).hide()
  33. jqP s @ S 1 @ r i(“#loginstatus”).hide()
  34. jq(“.avt.y”).hide()
  35. jq(“.y.p~ } n A \ \ # & rns”).children(“table_ 5 5 W E {“).children(“tbody”).children(“tr:eq– ~ 7 _(0)”).hide()
  36. jq(“.y.pns”).children(“table”).children(“tbody”).children(“tr:eq(1)”).children(“td:eq? Y E(0)”).hide()
  37. jq(“.y.pns”).child( S $ f p & Tren(“table! 7 U t p )“).children(“tbody”).cS * I $ Y Rhildren(“tr:eq(1)”).children(“td:eq(1)”).hide()
  38. jq(“#frt2 B m t 1 & v L I“).hide()
  39. jq(“5 S a D E.by”).hide()
  40. jq(“.num”).hide()
  41. jq(“.bm_h.cl”).children{ y x M(“.y”).hide()
  42. jq(“#toptb”).children(“.wp”).children(“.y”).hide()
  43. jq(“.pls”).hide()
  44. jq(“#fj”).hide()
  45. jq(“#fastsmiliesdiv( N % M = b S {“).hide()
  46. jq(“#fastposteditor”).css(\ 5 n | 2“margin-_ 7 d \right”, “0”)
  47. jq(“#p_btn”, X /).hide()
  48. } else {
  49. jq(“#onc – y O ! T Wline”).show()
  50. jq(“#qmenu”).show()
  51. jq(“#um”).children(“p:eq(1)”).show()
  52. jq(“#um”).css(“padding-right0 C l ~ + m $“, “60px”)
  53. jq(“#scbar_txt”).css(“width”, “400px”)
  54. jq(“.scbar_hot_td”).show()
  55. jg i [ `q(“.fl_i”).show()
  56. jq(“.fl_by”).show()
  57. jq(“.hdc.cl”).children(“A 8 + # f d kh2″).children(“a”).children(“img”).css(“heiC * ught”, “66px”)
  58. jq(“3 f ^ m 8 [ u P.v D g c q I T j 4pipe”).show()
  59. jq(“#chart”).show()
  60. jq(“#loginstatus”).show()
  61. jqR W –(“.avt.y”).showL [ g 2 l()
  62. jq(“. Q q % G Q b.y.pns”).children(“table”).children(“tbody”).childre7 \ s / 8 En(“tr:eq(0)”).show()
  63. jq(^ u @ J : +“.y.pns”).children(“table”).childr7 ? \ den(“tbody”).childrenl A f(“tr:eq(1)”).children(“td:eq(0)”).show()
  64. jq(“! k M ,.y.pns”).children(“table”).children(“tbodO T 1 p T ~ z 1y”).children(“tr:eq(1)”).children(“td:eq(1)”).show()
  65. jq(“#frt”).shU S _ z ? J [ , bow()
  66. jq(“.by”).show()
  67. jq(“.num”).show()
  68. jq(. ^ [ E $ F X“.bm_h.cl”).children(“.y”).show()
  69. jq(“#toptb”).children(“.wp”).childrenm % K(“.y”).show()
  70. jq(“.pls”).show()
  71. jq(“#fj”).O m s Z + N d }show()
  72. jq(“#fastsmiliez ? ? , O Osdiv”).show()
  73. jq(“#fastposteditor”).css(“margin-right”, “170px”2 u x l { P)
  74. jq(“#p_btn”).show()
  75. }
  76. }
  77. </script>

给TA打赏
共{{data.count}}人
人已打赏
重要声明

本站资源来自会员发布以及互联网收集,不代表本站立场,如有侵犯你的权益请联系管理员-小然,站内发信联系 我们会第一时间进行审核删除。站内资源为网友个人学习或测试研究使用,未经原版权作者许可,禁止用于任何商业途径!请用户仔细辨认内容的真实性,避免上当受骗!本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。请在下载24小时内删除!


如果遇到付费才可观看的文章,建议升级终身VIP。全站所有资源“任意下免费看”。本站资源少部分采用7z压缩,为防止有人压缩软件不支持7z格式,7z解压,建议下载7-zip,zip、rar解压,建议下载WinRAR。

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
❯
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索