css-animations

Rare IE10 bug: CSS animation of background-position fails with multiple backgrounds and percentage

久未见 提交于 2019-12-02 03:41:22
问题 This is a very specific bug - however, I would love for someone to show me a workaround! The bug basically consists in IE10 failing to do CSS animation of background-position when these two conditions are met at the same time : Having multiple backgrounds Setting background-position in percent Here's a demo, compare Chrome with IE10: http://codepen.io/dalgard/pen/LiyIK 回答1: You need to put a percentage sign after the zeros. It must be so: @keyframes move { 0% { background-position: 0%, 0%; }

CSS keyframes only works in Chrome

巧了我就是萌 提交于 2019-12-02 01:49:21
问题 i'm trying to make a simple animation using keyframes, but it only works in Chrome. Here is the code (i've only included keyframes code once, for shorter post): @keyframes logokf { 0% { background-image: url('gfx/logo1.png'); } 20% { background-image: url('gfx/logo2.png'); } 40% { background-image: url('gfx/logo3.png'); } 60% { background-image: url('gfx/logo4.png'); } 80% { background-image: url('gfx/logo1.png'); } 100% { background-image: url('gfx/logo1.png'); } } @-webkit-keyframes logokf

animate speedometer needle with pure css

六月ゝ 毕业季﹏ 提交于 2019-12-02 01:39:44
I have tried my best here Jsfiddle . Now I want to animate the center needle point slowly to fastly from left to right. I have heard about css keyframes and tried it. But, it goes left and right. I didn't get the expected result. How do I animate this needle using just pure css? CSS #logo { display: inline-block; position: relative; } #logo .speedometer { width: 80px; height: 80px; border-radius: 100%; border: 20px solid #000; border-right: 20px solid white; border-bottom: 20px solid white; -webkit-transform: rotate(45deg); display: inline-block; } #logo .needle { width: 5px; height: 50px;

Why this CSS3 animation doesn't work in MS Edge or IE11?

空扰寡人 提交于 2019-12-02 01:29:24
Here is the fiddle and below is the CSS code (the HTML is just an SVG ellipse). It works in Chrome, Firefox and Opera, but doesn't work in IE and Edge. What to do to see the animation in IE and Edge? #my-circle { stroke: blue; stroke-dasharray: 1100; stroke-dashoffset: 500; -moz-animation: draw-first-shape 1s forwards 3; -webkit-animation: draw-first-shape 1s forwards 3; animation: draw-first-shape 1s forwards 3; } @-moz-keyframes draw-first-shape { from { stroke-dashoffset: 1100; } to { stroke-dashoffset: 0; } } @-webkit-keyframes draw-first-shape { from { stroke-dashoffset: 1100; } to {

CSS border color switch animation: “from” color not correct

家住魔仙堡 提交于 2019-12-02 01:22:53
I built a css animation and part of it is changing the border color of a div. I'm using from and to values. The border should blink white and blue but instead of white I get a light blue . I built a minimal snippet to demonstrate this. Any idea what I'm doing wrong? .switch { width: 100px; height: 100px; border: 5px solid white; -webkit-animation: switch-animation 2s steps(2, start) infinite; animation: switch-animation 2s steps(2, start) infinite; } @keyframes switch-animation { from { border-color: white; } to { border-color: blue; } } @-webkit-keyframes switch-animation { from { border

CSS keyframes only works in Chrome

◇◆丶佛笑我妖孽 提交于 2019-12-02 01:22:05
i'm trying to make a simple animation using keyframes, but it only works in Chrome. Here is the code (i've only included keyframes code once, for shorter post): @keyframes logokf { 0% { background-image: url('gfx/logo1.png'); } 20% { background-image: url('gfx/logo2.png'); } 40% { background-image: url('gfx/logo3.png'); } 60% { background-image: url('gfx/logo4.png'); } 80% { background-image: url('gfx/logo1.png'); } 100% { background-image: url('gfx/logo1.png'); } } @-webkit-keyframes logokf { } @-moz-keyframes logokf { } @-o-keyframes logokf { } @-ms-keyframes logokf { } #logo:hover { float:

Rare IE10 bug: CSS animation of background-position fails with multiple backgrounds and percentage

北慕城南 提交于 2019-12-02 01:12:37
This is a very specific bug - however, I would love for someone to show me a workaround! The bug basically consists in IE10 failing to do CSS animation of background-position when these two conditions are met at the same time : Having multiple backgrounds Setting background-position in percent Here's a demo, compare Chrome with IE10: http://codepen.io/dalgard/pen/LiyIK You need to put a percentage sign after the zeros. It must be so: @keyframes move { 0% { background-position: 0%, 0%; } 100% { background-position: 0%, 100%; } } 来源: https://stackoverflow.com/questions/17053703/rare-ie10-bug-css

Reverse a CSS animation

眉间皱痕 提交于 2019-12-02 00:23:20
I did this: http://codepen.io/yayoni/pen/pgXoWY And I want to reverse the animation when I click on the small button but what I did doesnt work and I don't understand why. function anim() { var div = document.getElementById('fab'); div.className = "anim"; } function animrev() { var div = document.getElementById('fab'); div.className = "animrev"; } html, body { height: 100%; width: 100%; } #content { height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; } #fab { margin-right: 30px; color: white; font-size: 45px; outline: 0; border: 0; height: 150px; width:

keyframe animation does not work on safari for iOS

给你一囗甜甜゛ 提交于 2019-12-01 23:31:17
All the browsers (chrome, ie, firefox, safari) on windows show the animation as they should. When I have tried it on my iphone, the animation would not work. Any ideas why? Here is my CSS: #rotatingDiv { position: relative; z-index: 0; display: block; margin: auto; height: 30px; width: 30px; -webkit-animation: rotation .7s infinite linear; -moz-animation: rotation .7s infinite linear; -o-animation: rotation .7s infinite linear; animation: rotation .7s infinite linear; border-left: 8px solid rgba(0, 0, 0, .20); border-right: 8px solid rgba(0, 0, 0, .20); border-bottom: 8px solid rgba(0, 0, 0,

How can I export CSS animation as animated PNG, gif, or WEBP *with transparency*?

别等时光非礼了梦想. 提交于 2019-12-01 22:48:58
Press "Run code snippet" below to see the animated loading spinner that I want to save. I want to replace all green colors with transparency. Also, I'd like the animation to loop perfectly. I tried recording a screen capture video using OBS and then uploading to https://ezgif.com/video-to-gif and using the "Replace color with transparency" feature, but it didn't remove any green color at all. Also, if exporting canvas animations is easier than capturing CSS animations, I'd accept an answer that shows me how. body { display: flex; overflow: hidden; height: 100vf; padding: 0; margin: 0;