css-animations

Changing Background Image with CSS3 Animations

一个人想着一个人 提交于 2019-11-26 12:25:37
Why this isn't working? What am I doing wrong? CSS @-webkit-keyframes test { 0% { background-image: url('frame-01.png'); } 20% { background-image: url('frame-02.png'); } 40% { background-image: url('frame-03.png'); } 60% { background-image: url('frame-04.png'); } 80% { background-image: url('frame-05.png'); } 100% { background-image: url('frame-06.png'); } } div { float: left; width: 200px; height: 200px; -webkit-animation-name: test; -webkit-animation-duration: 10s; -webkit-animation-iteration-count: 2; -webkit-animation-direction: alternate; -webkit-animation-timing-function: linear; } DEMO

Imitating a blink tag with CSS3 animations

一笑奈何 提交于 2019-11-26 12:04:37
I really want to make a piece of text blink the old-school style without using javascript or text-decoration. No transitions, only *blink*, *blink*, *blink*! EDIT : This is different from that question because I ask for blinking without continuous transitions, whereas OP of the other questions asks how to replace blinking with continuous transitions The original Netscape <blink> had an 80% duty cycle. This comes pretty close, although the real <blink> only affects text: .blink { animation: blink-animation 1s steps(5, start) infinite; -webkit-animation: blink-animation 1s steps(5, start)

Filling water animation

£可爱£侵袭症+ 提交于 2019-11-26 11:59:50
问题 I am trying to get a wipe up animation to make a circle look like it\'s filling with water . I\'ve run into two errors, and haven\'t been able to even tackle the 3rd one: It fills up the wrong way It resets to empty (black) after it has filled * For now, I am using the <img> tags, but I would like to move this effect to body { background-image: } and need some direction on how to do this. What I have tried so far: #banner { width: 300px; height: 300px; position: relative; } #banner div {

How to keep origin in center of image in scale animation?

≯℡__Kan透↙ 提交于 2019-11-26 11:56:16
I have a situation similar to this fiddle , where I have a CSS3 animation that scales an element absolute-positioned in the centre of another element. However, when the animation takes place it is off-centre, as seen by the red squares relative to blue in the example. How do I centre it? I have tried a couple of configurations around the transform-origin property, but this isn't producing the correct results. Code below: @-webkit-keyframes ripple_large { 0% {-webkit-transform:scale(1);} 75% {-webkit-transform:scale(3); opacity:0.4;} 100% {-webkit-transform:scale(4); opacity:0;} } @keyframes

Reuse CSS animation in reversed direction (by resetting the state?)

好久不见. 提交于 2019-11-26 11:31:31
问题 I\'ve used two keyframe animations in CSS. One moves from left to right and the other one uses exact the same values - but reversed. @keyframes moveLeft { from {transform: translate3d(50px, 0, 0);} to {transform: translate3d(0px, 0, 0);} } @keyframes moveRight { from {transform: translate3d(0px, 0, 0);} to {transform: translate3d(50px, 0, 0);} } However, I wonder whether it\'s possible to use one keyframe animation only. but as soon as I add animation-direction: reverse , the animation does

How can I create a marquee effect?

久未见 提交于 2019-11-26 10:27:25
I'm creating a marquee effect with CSS3 animation. #caption { position: fixed; bottom: 0; left: 0; font-size: 20px; line-height: 30px; height:30px; width: 100%; white-space: nowrap; -moz-animation: caption 50s linear 0s infinite; -webkit-animation: caption 50s linear 0s infinite; } @-moz-keyframes caption { 0% { margin-left:120%; } 100% { margin-left:-4200px; } } @-webkit-keyframes caption { 0% { margin-left:120%; } 100% { margin-left:-4200px; } } <div id="caption"> The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. the quick brown fox jumps over the lazy

How to make blinking/flashing text with CSS 3?

元气小坏坏 提交于 2019-11-26 09:44:55
Currently, I have this code: @-webkit-keyframes blinker { from { opacity: 1.0; } to { opacity: 0.0; } } .waitingForConnection { -webkit-animation-name: blinker; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: cubic-bezier(.5, 0, 1, 1); -webkit-animation-duration: 1.7s; } It blinks, but it only blinks in "one direction". I mean, it only fades out, and then it appears back with opacity: 1.0 , then again fades out, appears again, and so on... I would like it to fade out, and then "raise" from this fade back again to opacity: 1.0 . Is that possible? Mr. Alien You

How to run the CSS3 animation to the end if the selector is not matching anymore?

余生颓废 提交于 2019-11-26 09:13:39
问题 I\'ve always thought that CSS3 Animations (differently from CSS3 Transitions) once started, always finish the job , no matter if the selector is not matching anymore the element that activated them. I\'m realizing today that I was probably wrong. In the following example, an animation is triggered by the :focus and :active pseudo-classes. Focus on the first textfield: if you press the tab button slowly, you will see the animations starting and ending correctly; if you press the tab button

Using CSS3 Animations in IE9+

浪子不回头ぞ 提交于 2019-11-26 08:19:11
问题 I have been trying to get these css3 animations to work in IE9 for a few hours today and I am stumped! I tried implementing a few JavaScript fallbacks but my knowledge is very limited so they failed. I am unsure if it was failing due to my user errors or code errors. Here is a jsFiddle of my code so far, I have replaced the background images with colours. Basically the green and black squares rotate in Firefox and Webkit browsers. http://jsfiddle.net/fJxsV/ I want to have it running on IE9

CSS3 Spin Animation

≯℡__Kan透↙ 提交于 2019-11-26 06:15:57
问题 I have reviewed quite a few demos and have no idea why I can\'t get the CSS3 spin to function. I am using the latest stable release of Chrome. The fiddle: http://jsfiddle.net/9Ryvs/1/ div { margin: 20px; width: 100px; height: 100px; background: #f00; -webkit-animation-name: spin; -webkit-animation-duration: 40000ms; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: linear; -moz-animation-name: spin; -moz-animation-duration: 40000ms; -moz-animation-iteration-count