這裏是一個真人版的http://lucasdebelder.be/googledoodle/如何在一個div上動畫這兩個東西?
首先我還挺想解決它不使用JavaScript/jQuery的,我希望保持它的純HTML &基於CSS的:)
專注於門戶網站,我希望在我的飛碟通過後讓它們開放並縮小。我已經嘗試過多件事但它不想工作。如何在不使用hover語句的情況下進行轉換?我有一個發光的,這是已經在它上面的盒子陰影,使它看起來互動,但我怎麼能讓它們縮小?
(Portaal代表的門戶網站,鏈接代表左,rechts代表權,這是荷蘭)
HTML:
<!-- portaal links en rechts -->
<div class="portaal portaal_links_glow"></div>
<div class="portaal portaal_rechts_glow"></div>
CSS:
/*portaal algemeen*/
.portaal {
position: absolute;
width: 100px;
height: 200px;
border-radius: 50px/100px;
bottom: 315px;
}
/*portaal links*/
.portaal_links_glow {
background: radial-gradient(ellipse at center, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
opacity: 0.75;
left: 50px;
animation-name: animation_portaal_glow_links;
animation-delay: 1s;
animation-duration: 4s;
animation-iteration-count: 2;
animation-timing-function: ease-in-out;
}
/*portaal rechts*/
.portaal_rechts_glow {
background: radial-gradient(ellipse at center, rgba(237,160,118,1) 0%,rgba(241,116,50,1) 50%,rgba(234,85,7,1) 51%,rgba(251,149,94,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
opacity: 0.65;
left: 750px;
animation-name: animation_portaal_glow_rechts;
animation-delay: 1s;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
}
/*portaal glow animatie LINKS*/
@keyframes animation_portaal_glow_links {
0% { box-shadow: 0 0 0px #57B6FF; }
50% { box-shadow: 0 0 55px #57B6FF; }
100% { box-shadow: 0 0 0px #57B6FF; }
}
/*portaal glow animatie rechts*/
@keyframes animation_portaal_glow_rechts {
0% { box-shadow: 0 0 0px #ea2803; }
50% { box-shadow: 0 0 55px #ea2803; }
100% { box-shadow: 0 0 0px #ea2803; }
}
感謝所有努力和時間。
你試過'過渡delay'? – Dominofoe