0
A
回答
2
如果你使用jQuery,喜歡的東西:
$('element').hover(function()
{
$('div').animate({ 'opacity': 1 });
});
1
1
您也可以使用淡入()和淡出()方法。 Link
2
試試這個:
<div class="hover">
<img src="http://www.google.com/intl/en_ALL/images/srpr/logo1w.png" alt="google" />
</div>
<div class="fade" style="display:none">
This text will Fade In and Out.
</div>
$(document).ready(function()
{
$("div.hover").hover(
function() {
$("div.fade").fadeIn('slow');
},
function() {
$("div.fade").fadeOut('slow');
}
);
});
順便問一下,你怎麼想它是CSS風格化?
+0
我需要能夠風格的股利,但那很容易。 – 2010-10-07 01:42:08
+0
很好的例子+1從我,但如何保持div可見當鼠標在淡出div?如果淡出div包含一些鏈接,它是沒有用的,因爲當鼠標不在父div中時它會關閉? – Goran 2013-08-23 14:43:59
1
使用CSS你可以改變淡出使用不透明
嘗試這
.box{
width: 180px;
text-align: center;
background-color: #fff;
padding: 5px 10px;
z-index: 10;
font-weight: bold;
color:#000;
}
.box:hover{
opacity: 0.7;
}
相關問題
- 1. 懸停淡入淡出與多個div
- 2. 圖像懸停上的div顯示(與淡入淡出)
- 3. 更高效的jQuery懸停淡入/淡出多個div?
- 4. 試圖在一個div上的鼠標懸停來激活另一個div的淡入淡出
- 5. jQuery淡入淡出暫停懸停
- 6. 如何淡出一個div並淡入另一個div?
- 7. jQuery懸停淡入淡出在不同的div
- 8. 懸停淡入不執行
- 9. 懸停時淡入/淡出標籤
- 10. 通過jQuery淡入/淡出懸停
- 11. jQuery的淡入淡出懸停4期
- 12. jQuery懸停淡入淡出問題
- 13. DIV淡入另一個DIV
- 14. 反覆懸停在圖像上導致「mouseenter」記錄每一個懸停和淡入和淡出
- 15. 懸停:淡入淡出,延遲,淡入淡出。 [不工作]
- 16. 如何淡入div而另一個div淡出?
- 17. 透明度上一個div懸停
- 18. 如何通過將圖像懸停在另一個div中來將圖像懸停在一個div上?
- 19. 如何在鏈接上懸停時淡入內容?
- 20. 懸停在文字上以改變圖像的淡入淡出
- 21. 淡入內容時鼠標移動並沒有懸停在一個div
- 22. 如何添加淡入和淡出功能在懸停功能上播放?
- 23. 如何淡入/淡出菜單時懸停在父母上的兒童
- 24. 如何讓懸停在一個div上觸發另一個div的更改?
- 25. 如何淡入div?
- 26. jQuery:如何淡出不常使用的div列表,並在鼠標懸停上淡入?
- 27. jQuery淡入替換上懸停的兩個圖像
- 28. 懸停在div觸發另一個div
- 29. 淡出DIV,並在下一個DIV與jQuery淡入淡出
- 30. 交叉淡入div背景:懸停 - 可能在CSS?
如果你能,你會提供HTML也是如此,如果它不以多少。謝謝:) – 2010-10-07 01:15:42