css-transitions

Animate an element on a sine path

↘锁芯ラ 提交于 2019-12-03 12:55:47
问题 I neeed to move an element on sine wave or path as shown in above image. I made something. But it is not working as I want. img { position:absolute; animation: roam infinite; animation-duration: 15s; } @keyframes roam { 0% { left: 50px; top:100px } 10%{ left:100px; top:100px } 20%{ left:200px; top:200px } 30%{ left:300px; top:50px } 40%{ left:400px; top:200px } } <img src="https://developer.chrome.com/extensions/examples/api/idle/idle_simple/sample-128.png"> 回答1: You can move an element on a

Interruption of a CSS transition does not work for same attribute value

做~自己de王妃 提交于 2019-12-03 12:30:11
I've answered a question on how to start an animation when hovering the child element and then preserve the applied style until un-hovering the parent. However, I discovered a behaviour in my proposed solution that I can't explain and that I would like to understand. Reading the relevant parts of the specification didn't help me. Here is a minimal example showing the expected behaviour. It works but the properties with comments behind have to be different for some reasons. Otherwise (e.g. both having 10px as value) un-hovering of the parent won't do anything to the width of the child. JSFiddle

Browser-specific prefixes with a CSS transition on transform

老子叫甜甜 提交于 2019-12-03 12:29:45
问题 According to caniuse.com, for those browsers that support both CSS transition and CSS transform , combinatorically there are at least three different types: Those that require the -webkit- prefix on both transition and transform (e.g. Safari 6, Android browser < 4.4). Those that only require the -webkit- prefix on transform (e.g. Chrome 3x). Those that require prefixes on neither (e.g. FF and IE10/11). How can I safely write my transition styles so that they are parsed correctly in each type?

Why does IE10 require the presence of a p:hover {} rule for transitions to work on a pseudo element?

走远了吗. 提交于 2019-12-03 11:52:50
HTML: <p>Hover</p> CSS: p::after { content: " here"; transition: all 1s; } p:hover::after { font-size: 200%; color: red; } Live demo: http://jsfiddle.net/SPHzj/13/ (works in Firefox and Chrome) As you can see, I've set up CSS transitions on the ::after pseudo-element of the paragraph. Then, when the paragraph is hovered, two new styles apply for the pseudo-element which are transitioned. This works in Firefox and Chrome, but not in IE10. My reasoning was that IE doesn't understand the p:hover::after selector, as it works in IE if you set the hover on an ancestor element, e.g. div:hover p:

CSS Filter on Retina Display: Fuzzy Images

廉价感情. 提交于 2019-12-03 11:40:01
问题 When you apply a -webkit-filter and a -webkit-transition to an Image and change the filter on hover, the image transition does well, but then the image gets really fuzzy. Note: This only happens on Retina-Displays — no problem at all with 'normal' ppi-displays, but fuzzy on for example a new MacBook Pro with Retina Display. My CSS (without vendor-prefixes): img {filter:grayscale(1);filter:saturate(0%);transition:2s ease;width:200px;height:200px} img:hover {filter:grayscale(0)}​ Note: to see

css3 button background color infinite transition

大城市里の小女人 提交于 2019-12-03 11:15:21
问题 Is there a way to make a button's background color fade from grey to blue then back to gray using only css3? A good example is a default action button is cocoa? I know this can be done in javascript but I'd rather only use css for this. 回答1: Hi i have made the button through CSS3 Animation please have look i hope its near to your question:- HTML <input type="submit" value="submit" class="button" /> CSS .button { width:100px; height:20px; background:red; animation:myfirst 5s; -moz-animation

collapse transition not working with angular's UI Bootstrap

匆匆过客 提交于 2019-12-03 11:15:00
I'm trying to create a div which will show / hide when a button is clicked. The UI Bootstrap page shows a nice simple example that uses a css transition. Here's my fiddle where I copy their code, almost exactly (slight change to make html syntax highlighting work, and a line to declare my "app" in the js). As you can see, it doesn't work as in the example -- there is no transition. Why not? Maybe a css transition rule is needed -- but isn't that part of what bootstrap.css provides? for posterity, the equivalent html file from the fiddle would be: <html> <head> <link rel="stylesheet" type="text

Using CSS3 transforms/animations with font-face produces “wobbly” spinner gif-like

别来无恙 提交于 2019-12-03 10:40:22
I'm using CSS transforms/animations with font-face ( twitter bootstrap/font-awesome ) to produce a spinner gif-like icon. The problem is that the icon wobbles as it revolves around 360degrees. See this JSFiddle to see what I mean. Does anyone know how to make it not wobble? Or at least make it rotate a little more smoothly? Here's the code for that below: CSS: i.icon-repeat { -webkit-animation: Rotate 500ms infinite linear; -moz-animation: Rotate 500ms infinite linear; -ms-animation: Rotate 500ms infinite linear; -o-animation: Rotate 500ms infinite linear; animation: Rotate 500ms infinite

Owl Carousel Transitions Effect Not Working After Chrome Latest Update (V36)

一曲冷凌霜 提交于 2019-12-03 09:49:56
问题 i'm using the OWl carousel for a while everything were perfect but recently i faced a issue after my chrome browser update. The css transition effects are not working anymore on chrome. But all effects working fine on firefox. Anyone can help me.. 回答1: I have found the Solution friends. Here is that.. Replacing the below line of code support3d = (asSupport !== null && asSupport.length >= 1 && asSupport.length <= 2); instead of support3d = (asSupport !== null && asSupport.length === 1); This

Css3 transition on scale only

纵饮孤独 提交于 2019-12-03 09:30:09
I am missing something obvious. But the transition on only one element isn't working here. Here's my code. #navigatore-servizi ul li a { color: #fff; text-decoration: none; text-shadow: 0 -1px 0 #008; display:block; width:240px; height:96px; background:#000; background-position: top center; line-height: 96px; font-family: sans-serif; text-transform: uppercase; text-align: center; -webkit-transition: -moz-transform .3s ease-out; -moz-transition: -webkit-transform .3s ease-out; -o-transition: -o-transform .3s ease-out; transition: transform .3s ease-out; } #navigatore-servizi ul li a:hover {