css-transitions

CSS transition fade in

和自甴很熟 提交于 2019-11-29 01:24:10
So I have used CSS transitions before but I have a unique case with this one. I am writing a custom plugin for creating modals. Essentially I create a div on the fly document.createElement('div') and append it to the body with a few classes. These classes define color and opacity. I would like to use strictly CSS to be able to fade in this div, but making the state change seems difficult b/c they require some user interaction. Tried some advanced selectors hoping it would case a state change, tried media query hoping to change state...looking for any ideas and suggestions, I really want to

I Want To Apply Delay On Mouse Out in css

耗尽温柔 提交于 2019-11-29 01:22:55
问题 I am trying to apply a delay before starting a CSS transition on mouse out event. My CSS code is below, please let me know how to apply time delay before CSS transition on mouse out starts. I want to achieve that the menu stays stable for some time (e.g. for 3 seconds) after the user moves mouse pointer out of the menu. .timnav li .dropdown { width: auto; min-width: 0px; max-width: 230px; height: 0; position: absolute; overflow: hidden; z-index: 999; background:rgba(255, 255, 255, 0.8); }

changePage “jumps” back to old page

丶灬走出姿态 提交于 2019-11-29 01:16:12
I've a big problem with a jQuery Mobile Application: I'm using custom functions (they are triggered by onClick) to switch the page with currentPage. It only happens on Android-Devices on sites in which has changed (due to ajax requests) with the integrated browser. iOS and Chrome works nice. After clicking on an element, the animation started but just before it ends, it switches back to the old page. After a half second, it switches back to the new. I made a movie of the bug here: http://www.youtube.com/watch?v=sXxvVUxniNg Thank you very much Code (CoffeeScript): class Guide @categoriesLoaded

CSS (transition) after a pseudo element - how to transition content that shows on hover

纵然是瞬间 提交于 2019-11-29 00:06:44
问题 <!DOCTYPE html> <html> <head> <style> div { transition:after 3s; -webkit-transition:after 3s; } div:hover:after { content:"- positive!"; } </style> </head> <body> <div>Test</div> </body> </html> I have this sample code above. I'm trying to use 'transition' so that the text: '- positive!' takes 3 seconds to slide/show up. But it isn't working.. How to fix it? 回答1: after is not a valid value of transition . Instead put transition as a property of the :after selector. HTML <div>Test</div> CSS

Why don't transitions on svg work on DOMContentLoaded without delay?

≯℡__Kan透↙ 提交于 2019-11-28 23:34:02
I have an svg with transitions set on it. Now when I add a class to it which has some properties varied then the transition only occur if I add delay between DOMContentLoaded event and addclass event. Here are two example, first with no delay second with an infinitesmall delay: Without Delay: ! function() { window.addEventListener('DOMContentLoaded', function() { var logo2 = document.querySelector("svg"); logo2.classList.add('start'); }); }(); <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 104.75 32.46"> <defs> <style> polygon { fill: red; transition: opacity 3s ease-out, transform 3s

CSS3 color transition not working in Chrome

对着背影说爱祢 提交于 2019-11-28 22:53:40
The links in the left menu in this website have a CSS3 transition property of the color , which changes on mouse hover. It's not working in Chrome 16 or 17 (the color change is sudden), whereas other transitions in the website do. It works in Firefox, Opera, and even Safari, which uses webkit like Chrome, so I don't think it might be a problem with my CSS. What then? Here's my CSS of this part (the full CSS is here ): #menu a { color: gray; transition: color 0.5s; -moz-transition:color 0.5s; /* Firefox 4 */ -webkit-transition:color 0.5s; /* Safari and Chrome */ -o-transition:color 0.5s; /*

angularjs chained fade-in / fade-out transition

ⅰ亾dé卋堺 提交于 2019-11-28 22:16:05
问题 I have looked at the official show/hide transition example at the bottom of this page... http://docs.angularjs.org/api/ng.directive:ngShow I have tried to modify it to get a seemless fade transition (transition: opacity 0.5s ease-in-out) from one div to the other, where both divs occupy the exact same position on the page, so that one div completely fades out before the other div begins to fade in. In jquery, it would be as simple as: $("#divA").fadeOut(function() { $("divB").fadeIn(); });

How To Add CSS3 Transition With HTML5 details/summary tag reveal?

烂漫一生 提交于 2019-11-28 21:40:30
Using just CSS3, is there a way to add a nice fade-in and slide-from-left transition effect on a DETAILS / SUMMARY reveal? For a demo of this new tag, see this demo: https://jsfiddle.net/43m61yt0/1/ Here's the HTML for it: <details> <summary>Copyright 1999-2014.</summary> <section> <p> - by Refsnes Data. All Rights Reserved.</p> <p>All content and graphics on this web site are the property of the company Refsnes Data.</p> </section> </details> In my case, after the summary tag, I put all other content in its own section tag so that I could style it because summary:after selector didn't seem to

Animating max-height with CSS transitions

巧了我就是萌 提交于 2019-11-28 21:04:35
I want to create an expand/collapse animation that's powered only by classnames (javascript is used to toggle the classnames). I'm giving one class max-height: 4em; overflow: hidden; and the other max-height: 255em; (I also tried the value none , which didn't animate at all) this to animate: transition: max-height 0.50s ease-in-out; I used CSS transitions to switch between them, but the browser seems to be animating all those extra em 's, so it creates a delay in the collapse effect. Is there a way of doing it (in the same spirit - with css classnames) that doesn't have that side-effect (I can

Animate the CSS transition property within :after/:before pseudo-classes

て烟熏妆下的殇ゞ 提交于 2019-11-28 20:59:46
问题 Is it possible to animate CSS pseudo-classes? Say I have: #foo:after { content: ''; width: 200px; height: 200px; background: red; display: block; -webkit-transition: all 1s ease-in-out; -moz-transition: all 1s ease-in-out; -o-transition: all 1s ease-in-out; } #foo:hover:after { width: 250px; height: 250px; } Is this even possible? I've been testing and so far I can't seem to find a solution. I'm trying to trim down the amount of JavaScript support I need by using Modernizr. I already have a