使用者工具

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版前次修改
下次修改
前次修改
bootstrap [2024/10/27 08:38] hostbootstrap [2024/12/17 22:11] (目前版本) host
行 1: 行 1:
-<html>  <ul id="myUL"> +[[NOD|《奉愛的甘露》]]\
-  <li><span class="caret">Beverages</span> +[[CC|《永恆的采坦亞經》]]
-    <ul class="nested"> +
-      <li>Water</li> +
-      <li>Coffee</li> +
-      <li><span class="caret">Tea</span> +
-        <ul class="nested"> +
-          <li>Black Tea</li> +
-          <li>White Tea</li> +
-          <li><span class="caret">Green Tea</span> +
-            <ul class="nested"> +
-              <li>Sencha</li> +
-              <li>Gyokuro</li> +
-              <li>Matcha</li> +
-              <li>Pi Lo Chun</li> +
-            </ul> +
-          </li> +
-        </ul> +
-      </li> +
-    </ul> +
-  </li> +
-</ul>  +
- /* Remove default bullets */ +
-ul, #myUL { +
-  list-style-type: none; +
-+
- +
-/* Remove margins and padding from the parent ul */ +
-#myUL { +
-  margin: 0; +
-  padding: 0; +
-+
- +
-/* Style the caret/arrow */ +
-.caret { +
-  cursor: pointer; +
-  user-select: none; /* Prevent text selection */ +
-+
- +
-/* Create the caret/arrow with a unicode, and style it */ +
-.caret::before { +
-  content: "\25B6"; +
-  color: black; +
-  display: inline-block; +
-  margin-right: 6px; +
-+
- +
-/* Rotate the caret/arrow icon when clicked on (using JavaScript) */ +
-.caret-down::before { +
-  transform: rotate(90deg); +
-+
- +
-/* Hide the nested list */ +
-.nested { +
-  display: none; +
-+
- +
-/* Show the nested list when the user clicks on the caret/arrow (with JavaScript) */ +
-.active { +
-  display: block; +
-}  +
-var toggler = document.getElementsByClassName("caret"); +
-var i; +
- +
-for (i = 0; i < toggler.length; i++) { +
-  toggler[i].addEventListener("click", function() { +
-    this.parentElement.querySelector(".nested").classList.toggle("active"); +
-    this.classList.toggle("caret-down"); +
-  }); +
-}  +
-</html>+

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information