我正在使用點擊展開摺疊使用<details>
和<summary>
標籤。 它可以膨脹和崩潰沒有問題。 我只想擴展一個信息一次。點擊展開詳細信息和摘要標記
我的意思是, 當我點擊information1它會展開,然後再次點擊information2。 然後信息1摺疊和信息2展開。 這意味着只有一次可以擴展。
我怎麼能做到這一點,只有使用CSS
<details>
<summary>Information1</summary>
If your browser supports this element, it should allow
you to expand and collapse these details.
</details>
<details>
<summary>Information2</summary>
If your browser supports this element, it should allow
you to expand and collapse these details.
</details>
<details>
<summary>Information3</summary>
If your browser supports this element, it should allow
you to expand and collapse these details.
</details>
<details>
<summary>Information4</summary>
If your browser supports this element, it should allow
you to expand and collapse these details.
</details>
https://fiddle.jshell.net/mjxhj5se/
謝謝..
你是如何擴大呢? –
https://fiddle.jshell.net/mjxhj5se/你可以在這裏看到 – sj2012
可能重複[自動關閉所有其他標籤後打開一個特定的標籤](http://stackoverflow.com/questions/16751345/自動關閉所有其他細節標籤打開後特定的詳細信息) –