瀏覽代碼

宽度设置

zhangxc 4 年之前
父節點
當前提交
9efa23e3a7
共有 1 個文件被更改,包括 6 次插入7 次删除
  1. 6 7
      src/js/information.js

+ 6 - 7
src/js/information.js

@@ -149,15 +149,14 @@ function bindTabClick(){
   })
 }
 function adjustHeight() {
-  var ht = window.innerHeight;
+  var ht = window.innerHeight || document.documentElement.clientHeight;
   $(".content").height(ht - 145 - 30 + "px");
 }
-// function adjustWidth() {
-//   var wt = window.innerWidth;
-//   var wt = window.innerWidth || document.documentElement.clientWidth;
-//   $(".titleH2").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
-//   $(".content").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
-// }
+function adjustWidth() {
+  var wt = window.innerWidth || document.documentElement.clientWidth;
+  $(".titleH2").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
+  $("pre").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
+}
 $(window).on('resize', function(){
   adjustHeight()
   adjustWidth()