建立網站在http://nelsonkeating.com/PHP懸停行動
當您將鼠標懸停在圖像上時,您會看到3個動作出現。如何刪除這些內容,而只是在用戶懸停時顯示頁面的標題(標題當前正好在圖片的下方)
*這是一個WordPress站點。
謝謝!
建立網站在http://nelsonkeating.com/PHP懸停行動
當您將鼠標懸停在圖像上時,您會看到3個動作出現。如何刪除這些內容,而只是在用戶懸停時顯示頁面的標題(標題當前正好在圖片的下方)
*這是一個WordPress站點。
謝謝!
輸出的HTML看起來像這樣(大量輸出清理後):
<div class="img-container">
<a href="http://nelsonkeating.com/why-were-here/"><img width="310" height="206" src="http://nelsonkeating.com/wp-content/uploads/2012/01/whit-and-me-park-310x206.png" class="attachment-post-thumbnail wp-post-image" alt="whit and me park" title="whit and me park" /></a>
<div class="actions">
<a href="http://nelsonkeating.com/wp-content/uploads/2012/01/whit-and-me-park.png" rel="gallery" title="What We Do" class="view">Enlarge</a>
<a class="share">Share</a>
<a href="http://nelsonkeating.com/why-were-here/#comments" class="comment"><span>0</span> Comment</a>
<div class="share-container">
<div class="share-icons">
<a href="javascript: void(0)" class="twitter-share iframe" onClick="twitPop('http://nelsonkeating.com/why-were-here/', 'What We Do - ', 'sawyerh:Best Designer Alive')">Twitter</a>
<a href="http://www.facebook.com/sharer.php?u=http://nelsonkeating.com/why-were-here/&t=What We Do" class="facebook-share" target="_blank">Facebook</a>
<a href="http://www.stumbleupon.com/submit?url=http://nelsonkeating.com/why-were-here/&title=What We Do" class="stumble-share" target="_blank">StumbleUpon</a>
<a href="http://technorati.com/cosmos/search.html?url=http://nelsonkeating.com/why-were-here/" class="tech-share" target="_blank">Technorati</a>
<a href="http://digg.com/submit?phase=2&url=http://nelsonkeating.com/why-were-here/&title=What We Do" class="digg-share" target="_blank">Digg</a>
<a href="http://del.icio.us/post?url=http://nelsonkeating.com/why-were-here/&title=What We Do" class="delicious-share" target="_blank">Delicious</a>
<a href="mailto:EMAIL?body=http://nelsonkeating.com/why-were-here/" class="email-share" target="_blank">Email</a>
</div>
</div><!-- #share-container -->
</div><!-- #actions -->
<div class="clearfix"></div>
</div><!-- #img-container -->
<h2><a href="http://nelsonkeating.com/why-were-here/" title="What We Do" rel="bookmark">What We Do</a></h2>
因此,有幾件事情注意這裏。 actions
div看起來像是在懸停時顯示的那個。 <h2>
就是你想要展示的。所以,要做的事情就是將<h2>
代放入actions
div中,並註釋掉(或刪除)該代碼。
一個更好的解決方案是,除此之外,通過jQuery挖掘並確保你沒有打破懸停的任何代碼。另外,由於我只能猜測這是一個主題,因此可能會出現一些問題。主題通常非常緊密(至少在我的經驗中),而改變某些東西可能會產生層疊效應。
如果你看到你的HTML代碼中的每個容器的它在形式:
<div class="img-container">
<a href="http://nelsonkeating.com/whitney-danielle/"><img width="310" height="315" src="http://nelsonkeating.com/wp-content/uploads/2012/01/DW3-310x315.jpg" class="attachment-post-thumbnail wp-post-image" alt="D&W3" title="D&W3" /></a>
<div class="actions">
<a href="http://nelsonkeating.com/wp-content/uploads/2012/01/DW3.jpg" rel="gallery" title="Whitney & Danielle" class="view">Enlarge</a>
<a class="share">Share</a>
<a href="http://nelsonkeating.com/whitney-danielle/#comments" class="comment"><span>0</span> Comment</a>
<div class="share-container">
<div class="share-icons">
<a href="javascript: void(0)" class="twitter-share iframe" onClick="twitPop('http://nelsonkeating.com/whitney-danielle/', 'Whitney & Danielle - ', 'sawyerh:Best Designer Alive')">
Twitter</a>
<a href="http://www.facebook.com/sharer.php?u=http://nelsonkeating.com/whitney-danielle/&t=Whitney & Danielle" class="facebook-share" target="_blank">
Facebook</a>
<a href="http://www.stumbleupon.com/submit?url=http://nelsonkeating.com/whitney-danielle/&title=Whitney & Danielle" class="stumble-share" target="_blank">
StumbleUpon</a>
<a href="http://technorati.com/cosmos/search.html?url=http://nelsonkeating.com/whitney-danielle/" class="tech-share" target="_blank">
Technorati</a>
<a href="http://digg.com/submit?phase=2&url=http://nelsonkeating.com/whitney-danielle/&title=Whitney & Danielle" class="digg-share" target="_blank">
Digg</a>
<a href="http://del.icio.us/post?url=http://nelsonkeating.com/whitney-danielle/&title=Whitney & Danielle" class="delicious-share" target="_blank">
Delicious</a>
<a href="mailto:EMAIL?body=http://nelsonkeating.com/whitney-danielle/" class="email-share" target="_blank">
Email</a>
</div>
</div><!-- #share-container -->
</div><!-- #actions -->
<div class="clearfix"></div>
</div><!-- #img-container -->
不知道如何腳本正是工作我會建議你修改這是上透露actions
類裏面的內容懸停
解釋你爲什麼低估這一點,否則他們沒有辦法改善這個問題。 – Ktash
沒有downvote,但顯示代碼肯定可以幫助... – gdoron