|
@@ -1,12 +1,24 @@
|
|
window.onload = function(){
|
|
window.onload = function(){
|
|
- if(screen.width >= 901){
|
|
|
|
|
|
+ /* if(screen.width >= 901){
|
|
window.location.href = "https://www2.hhh.com.tw/";
|
|
window.location.href = "https://www2.hhh.com.tw/";
|
|
|
|
+ } */
|
|
|
|
+ if(screen.width <= 480) {
|
|
|
|
+ let height = (window.screen.width * 2) / 3;
|
|
|
|
+ console.log(height);
|
|
|
|
+ $('.sec-02 .slide-item').css('height', `${height}px`);
|
|
|
|
+ let topHeight = (window.screen.width * 30) / 131;
|
|
|
|
+ console.log(topHeight);
|
|
}
|
|
}
|
|
- let height = (window.screen.width * 2) / 3;
|
|
|
|
- console.log(height);
|
|
|
|
- $('.sec-02 .slide-item').css('height', `${height}px`);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+window.addEventListener('resize', reportWindowSize);
|
|
|
|
+
|
|
|
|
+function reportWindowSize() {
|
|
|
|
+ if(screen.width > 480) {
|
|
|
|
+ $('.sec-02 .slide-item').css('height', `130vh`);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
$(".sec-01__slider").slick({
|
|
$(".sec-01__slider").slick({
|
|
dots: true,
|
|
dots: true,
|
|
autoplay: false,
|
|
autoplay: false,
|