Prechádzať zdrojové kódy

調整收合判斷及樣式

syuanyuri 3 rokov pred
rodič
commit
e424d75be4

+ 5 - 3
content/規劃師服務/index.md

@@ -10,7 +10,9 @@ url: "/room_planner"
     let questionList = document.querySelectorAll('.question');
     Array.from(questionList).map(e => {
       e.addEventListener('click', (item) => {
-        let rotateElement = item.target.firstElementChild.id;
+        let rotateElement;
+        // 判斷是否點擊三角形
+        item.target.firstElementChild?.id ? rotateElement = item.target.firstElementChild.id : rotateElement = item.target.id;
         let element = document.getElementById(`${rotateElement}`);
         if (element.style.webkitTransform === 'rotate(0deg)') {
           element.style = "transform: rotate(-90deg)";
@@ -232,7 +234,7 @@ url: "/room_planner"
           04 <br> 付款階段
         </p>
       </div>
-      <div class="row" style="letter-spacing: 1px">
+      <div class="row" style="letter-spacing: 1px; width: 100%;">
         <div class="col-12 col-md-6" style="padding: 0 20px;">
           <section>
             <img src="/img/room_planner4/4-1.png" alt="" class="img-style" style="margin-bottom: 15px;">
@@ -315,7 +317,7 @@ url: "/room_planner"
               當裝修完成80%,我們安排系統櫃到你家進行安裝,接著進行細部清潔,並安排家具到府定位。
             </p>
             <amp-accordion id="myAccordion" disable-session-states="">
-              <section>
+              <section class="example-5">
                 <div class="question example" style="border: none; background: none; padding: 0;"><span
                     id="rotate-5">▼</span> 整體完工時間參考
                 </div>

+ 10 - 0
themes/hugo-lamp/static/css/chuz.css

@@ -3395,6 +3395,16 @@ section-style .sub-title,
   }
 }
 
+.section25 .example-5 {
+  height: 100px;
+}
+
+@media (max-width: 768px) {
+  .section25 .example-5 {
+    height: auto;
+  }
+}
+
 .section26 {
   background-color: #f1f1f1;
 }