瀏覽代碼

sec02 height

huai-sian 3 年之前
父節點
當前提交
ce0509c186
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      js/index.js

+ 7 - 0
js/index.js

@@ -2,7 +2,14 @@ window.onload = function(){
     if(screen.width < 900){
         window.location.href = "https://m3.hhh.com.tw/";   
     }
+    detectDirection ();
 }
+  
+  function detectDirection () {
+    let height = (window.screen.width * 5) / 12;
+    console.log(height);
+    $('.sec-02 .slide-item').css('height', `${height}px`);
+  }
 
 let result;
       $.ajax({