我想有雙重懸停效果,但我不明白。 我想通過離開顯示的圖標來避免轉換。如何使css雙重懸停效果
也許我在這裏得到一些幫助。任何建議都是值得歡迎的。
這裏是我的HTML:
<div class="block image addMore" style="position: absolute; top: 100px; left: 50px; height: 350px;width:200px;background-color:red;">
<span data-action="fullView" class="shopIcons full_screen_icon"></span>
<figure class="with-hidden-caption">
please hover here. after a second a icon will apear in the right corner.
<br><br>
If you hover the icon it will change. Until here everything is OK.<br><br>
But, if you leave the icon, it shout show the old one without the rolling effekt.
</figure>
</div>
和CSS:
.shopIcons {
background: url("http://www.dasunddas.de/img/base/shop_icons.png?v=63") no-repeat scroll 0 0 transparent;
}
span.full_screen_icon {
background-position: 0px 0px;
cursor: pointer;
opacity: 0;
height: 45px;
position: absolute;
right: -45px;
top: -45px;
width: 45px;
z-index: 10;
transition-duration: .6s;
transition-delay: 1s;
/* transition: all; */
}
span.full_screen_icon:hover {
background-position: 0px -50px;
transition-delay: 0s;
transition-duration: 0s;
}
div.addMore:hover span.full_screen_icon {
opacity: 1;
right: 0;
top: 0;
}
你已經有一個「雙翱翔」,有什麼問題?你想使用較少的標記? – coma 2013-05-04 09:07:33
是的,我有雙重懸停。但是讓第二次懸停產生錯誤的效果。我想避免在背景位置的過渡。它通過離開圖標 – hamburger 2013-05-04 09:10:27
呼籲工作沒有過渡哦,現在我明白了,你應該加上這個問題。 – coma 2013-05-04 09:12:04