Browse Source

sec02 height

huai-sian 3 years ago
parent
commit
ce0509c186
1 changed files with 7 additions and 0 deletions
  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({