我需要鼠標懸停時就是這樣的一個彈出式動畫,當你動過上行駛的車輛/內容獲利鼠標/提高參與度:https://www.taboola.com/流行起來的動畫
好像階級CSS動畫.cta3-項目。我不確定它是否也使用jQuery。
任何人都可以請一個簡單的例子嗎?
非常感謝!
我需要鼠標懸停時就是這樣的一個彈出式動畫,當你動過上行駛的車輛/內容獲利鼠標/提高參與度:https://www.taboola.com/流行起來的動畫
好像階級CSS動畫.cta3-項目。我不確定它是否也使用jQuery。
任何人都可以請一個簡單的例子嗎?
非常感謝!
這裏的東西簡單,下次請把你的現有代碼的問題描述和/或鏈接到一個小提琴。
我只是使用CSS3轉換屬性並在jQuery中切換類。
CSS3
.flip-target {
transition: 0.6s;
transform-style: preserve-3d;
transform: rotateX(90deg);
transform-origin:center bottom;
opacity: 0;
}
.flip-target.flip {
transform: rotateY(0deg);
transform: translatey(-40px);
opacity: 1;
}
jQuery的
$("#flip").click(function() {
$(".flip-target").toggleClass("flip");
});
使用animate.css CSS庫作用,並添加jqquery這樣
$(document).ready(function(){
$('.yourdiv').hover(function(){
$(this).addClass('animated youranimationname');
}).mouseleave(function(){
$(this).removeCLass('animated youranimationname');
});
});
非常感謝!我會試試這個。另外,由於我沒有這樣的聲望,我無法對您的評論進行投票。對於那個很抱歉。 – digitized
哦,這是我的榮幸 –
你能告訴我們你試過嗎? –
我使用了該網站的確切HTML和CSS。我用的CSS是: .cta3-items { background:#3570cc none repeat scroll 0 0; bottom:-80px; font-size:15px; 不透明度:0; padding:20px; position:absolute; text-align:center; transform:rotateX(90deg); transform-origin:center bottom 0; 過渡:全部400ms緩解0s; 寬度:100%; z-index:2000; } 格式化道歉。不知道如何在這裏格式化代碼。謝謝! – digitized
在jsfiddle.com上創建一個小提琴或在這裏創建一個片段 –