我的目標是一旦我點擊每個照片 - 現在不顯示(但你可以看到破碎的圖像圖標)這個div內的文本「core-tab-sec」 應該改變。你現在看到三段,每段都是爲了一張照片。所以他們中的兩個應該被隱藏,只有一個被顯示。更改div中的文本
任何人都可以幫助我嗎? 因此,這裏是我的所有代碼 https://jsfiddle.net/net1994/7zovyuow/
<div class="core-tab-sec">
<ul class="core-tabNav">
<li class="active"><a href="#tab1"><figure><img src="<?php bloginfo('template_url'); ?>/img/people-icon.png" alt="PEOPLE"></figure><div>PEOPLE</div></a></li>
<li><a href="#tab2"><figure><img src="<?php bloginfo('template_url'); ?>/img/passion-icon.png" alt="PASSION"></figure><div>PASSION</div></a></li>
<li><a href="#tab3"><figure><img src="<?php bloginfo('template_url'); ?>/img/performance.png" alt="PERFORMANCE"></figure><div>PERFORMANCE</div></a></li>
</ul>
<div class="core-tabCnt">
<div class="core-tabSec" id="tab-1">
<p>We believe in people. People solve problems. Our employees are passionate problem solvers always looking for long-term solutions that will benefit our clients and OneIMS. They thrive in and promote a collaborative and innovative environment, working hard to achieve corporate goals.</p>
</div>
<div class="core-tabSec" id="tab2">
<p>We could not be a marketing company without being passionate about innovation. From keeping up with industry changes to using the latest techniques, our creativity and passion drives innovation that helps our clients achieve their goals.</p>
</div>
<div class="core-tabSec" id="tab3">
<p>The success of our clients is driven by results. Results are driven by our performance. That’s why we relentlessly pursue success, strive for flawless execution, work hard and continuously look for ways to maximize our client’s return on investment. </p>
</div>
</div>
</div>
如何做到這一點? 我可以使用css或js嗎? 謝謝!
份額,你已經嘗試 –
你可以在CSS隱藏和顯示創建兩個類,並添加,並根據點擊圖片 –