Browse Source

add @media width

huaisian 2 years ago
parent
commit
55b850841c
3 changed files with 39 additions and 7 deletions
  1. 35 3
      iframe.html
  2. 1 1
      index.html
  3. 3 3
      js/index.js

+ 35 - 3
iframe.html

@@ -425,6 +425,12 @@ div.div_info ul {
   max-height: 110px !important;
   height: auto;
 }
+
+#tinan, #ping{
+  height: 120px; 
+  max-height: 120px !important;
+}
+
 .hometv_ul_title {
   min-height: 35px !important;
 }
@@ -672,7 +678,7 @@ div.div_info ul li.location_title {
     width: 200px !important;
     /*padding-bottom: 25px !important;*/
     height: auto !important;
-    max-height: 100px !important;
+    max-height: 200px !important;
   }
 
   div.div_info ul li.system {
@@ -727,6 +733,7 @@ div.div_info ul li.location_title {
   .article-content ul,
   div.entry-content ul {
     margin: 0px 0px 0px 0px;
+    display: flex;
   }
 }
 .v-dialog--scrollable {
@@ -750,6 +757,31 @@ div.div_info ul li.location_title {
   overflow: visible;
 }
 
+@media screen and (max-width: 768px) {
+  .modal-dialog {
+    width: calc(100% - 0.5rem);
+    margin: 3.5rem 0.25rem;
+    height: calc(100% - 8rem);
+  }
+  .btn-dismiss {
+    right: 0rem;
+    top: -2.5rem;
+  }
+  .modal-body {
+    padding: 0;
+  }
+  .div.entry-content ul li {
+    font-size: 14px;
+  }
+  div.div_info ul {
+    max-height: 220px !important;
+  }
+
+  #tinan, #ping{
+    max-height: 220px !important;
+  }
+}
+
 
     </style>
   </head>
@@ -779,9 +811,9 @@ div.div_info ul li.location_title {
                 <ul><li class="system">凱擘-振道有線<li class="ch">CH91</li><li class="location">新竹:新竹市</li></ul>
                 <ul><li class="system">凱擘-豐盟有線<li class="ch">CH91</li><li class="location">台中:豐原區、東勢區、后里區、神岡區、潭子區、大雅區、新社區、石岡區、外埔區、和平區</li></ul>
                 <ul><li class="system">凱擘-新頻道<li class="ch">CH91</li><li class="location">彰化:和美鎮、鹿港鎮、秀水鄉、芬園鄉、線西鄉、伸港鄉、花壇鄉、福興鄉、彰化市、埔鹽鄉、大村鄉</li></ul>
-                <ul style="height: 120px; max-height: 120px !important;"><li class="system">凱擘-南天有線<li class="ch">CH91</li><li class="location">台南:新營區、鹽水區、下營區、柳營區、後壁區、白河區、東山區、六甲區、官田區、佳里區、麻豆區、西港區、七股區、將軍區、北門區、學甲區</li></ul>
+                <ul id="tinan"><li class="system">凱擘-南天有線<li class="ch">CH91</li><li class="location">台南:新營區、鹽水區、下營區、柳營區、後壁區、白河區、東山區、六甲區、官田區、佳里區、麻豆區、西港區、七股區、將軍區、北門區、學甲區</li></ul>
                 <ul><li class="system">凱擘-觀昇<li class="ch">CH91</li><li class="location">屏東:長治鄉、鹽埔鄉、高樹鄉、九如鄉、霧台鄉、萬丹鄉、里港鄉、麟洛鄉、瑪家鄉、新園鄉、三地門鄉、內埔鄉、泰武鄉、屏東市</li></ul>
-                <ul style="height: 120px; max-height: 120px !important;"><li class="system">凱擘-屏南</li><li class="ch">CH91</li><li class="location" style="height: 140px;">
+                <ul id="ping"><li class="system">凱擘-屏南</li><li class="ch">CH91</li><li class="location" style="height: 140px;">
                   屏東:潮州鎮、恆春鎮、獅子鄉、萬巒鄉、牡丹鄉、春日鄉、佳冬鄉、枋山鄉、南州鄉、崁頂鄉、滿州鄉、來義鄉、東港鎮、竹田鄉、枋寮鄉、林邊鄉、車城鄉、琉球鄉、新埤鄉
                 </li>
                 </ul>

+ 1 - 1
index.html

@@ -1940,7 +1940,7 @@
 
     <script type="text/javascript">
       // Test插入按鈕與iframe
-      $('.test-ifr').click(function() {
+      document.querySelector('.test-ifr').addEventListener('click', function() {
         document.getElementById("main").style.display = 'block';
         document.getElementById("main").contentWindow.document.body.style.display = 'block';
         document.getElementById("main").contentWindow.document.body.classList.add('show');

+ 3 - 3
js/index.js

@@ -2,9 +2,9 @@ let userAgent;
 let isSafari = false;
 let browserName;
 window.onload = function(){
-    if(screen.width < 900){
-        window.location.href = "https://m3.hhh.com.tw/";   
-    }
+    // if(screen.width < 900){
+    //     window.location.href = "https://m3.hhh.com.tw/";   
+    // }
     userAgent = navigator.userAgent;
     detectBrowser(userAgent);
     detectDirection ();