我試着用不同的詞創建詞典。我想用文字顯示定義。臺式機3×3,平板電腦2×2和手機1×1(手風琴系統)。Tab system 3 by 3 items
我在每個列表中添加了一個data-link
屬性,並在每個div中添加了data-content
屬性。
我嘗試每個data-link
每個data-content
<ul class="tabs">
<li><a href="#" data-link="0">Word 01</a></li>
<li><a href="#" data-link="1">Word 02</a></li>
<li><a href="#" data-link="2">Word 03</a></li>
<li><a href="#" data-link="3">Word 04</a></li>
<li><a href="#" data-link="4">Word 05</a></li>
<li><a href="#" data-link="5">Word 06</a></li>
</ul>
<div class="tab-content">
<div data-content="0">Definition of word 01</div>
<div data-content="1">Definition of word 02</div>
<div data-content="2">Definition of word 03</div>
<div data-content="3">Definition of word 04</div>
<div data-content="4">Definition of word 05</div>
<div data-content="5">Definition of word 06</div>
</div>
https://jsfiddle.net/Xroad/qbh79xoy/27/
桌面版本相匹配:
手機版:
這份名單由WordPress的產生。在開始時,我們將獲得50個單詞並在100之後。定義將通過HTML頁面中的Wordpress自動注入PHP。所以列表必須是動態的。我可以幫忙嗎?
你的問題實在是不清楚部分原因是因爲你的英語不是很好。你能否創建一張圖片,以便更清楚你想要實現的目標? –
@AndreiGheorghiu,我很抱歉我的英文不好,我用照片更新了我的文章。 – Xroad
所以你想1,2和3的定義顯示在相同的空間,4,5&6在相同的空間等? –