transitions

CSS3 transitions to dynamically created elements

此生再无相见时 提交于 2019-11-29 06:02:31
问题 I'm trying to animate a dynamically created html element with CSS3 transitions . I want the animation to start just before the element is created. For these i create a class that set the original position of the element and then I set the target position by the jquery css() method But the new element it just apears in the target position without any transition. If I use a setTimeout of 0ms to set the new css value it work. There is something I'm doing wrong? or is a limitation? I don't think

Using Modernizr and jQuery to Animate if CSS3 Transitions Don't Exist

给你一囗甜甜゛ 提交于 2019-11-29 03:58:53
问题 Is there a way to use a combination of Modernizr and jQuery to enable something similar to transitions if CSS3 isn't supported? What I'm currently doing is like this... <div class="hoverable"> <p>This div changes both width and height on hover</p> </div> The CSS is .hoverable { height: 100px; width: 2000px; transition: height .5s, width .5s; } .hoverable:hover { height: 200px; width: 100px; } I'm currently just using Modernizr to make the div be in the hover state by default if CSS3

Estimate Markov Chain Transition Matrix in MATLAB With Different State Sequence Lengths

感情迁移 提交于 2019-11-29 02:41:25
I'm trying to build the transition matrix for a Markov Chain in MATLAB; I have several different observation sequences (all of varying lengths) and I need to generate the transition matrix using those. Constructing a multi-order Markov chain transition matrix in Matlab shows me how to build a transition matrix with a single observation sequence. How can I construct one using observations of different length? One example can be that one sequence is 1,2,3,4 and another is 4,5,6. Is there any way to do this without having to for loop through all sequences and computing counts? So for Markov

CSS 3 - transition prefixes - which ones to use?

末鹿安然 提交于 2019-11-29 02:22:30
问题 I have a question regarding the CSS vendor prefixes for transition. This source states that "you need to use all the usual prefixes to make this work in all browsers (-o-, -webkit-, -moz-, -ms-)". That page only shows the -webkit- and -moz- prefixes and claims that IE 10+, FF 16+ and Opera 12.1+ can read the prefix free version. In the code of Twitter Bootstrap, there is always exists a -webkit- , -moz- and -o- prefixed version in addition to the un-prefixed version. What prefixes should I

D3.js chain transitions for compound animations for different shapes

旧街凉风 提交于 2019-11-28 20:51:14
What I'm trying to do... I'm toying with D3 to make a compound animation. I have the following final state: Essentially I want to animation connecting the dots - add the first circle . Then draw the line to the second circle. Once the line is drawn, the second circle is added. To add some visual appeal, I perform other transitions, such as changing circle radius for the first and second circle as the line is draw. What I've tried... I can add the circles and draw the line individually, including animations. However, I'm not sure how to proceed with chaining the transitions together to form the

Different CSS transition-delays for hover and mouseout?

最后都变了- 提交于 2019-11-28 17:25:25
Is it possible to use CSS3 transitions with a different delay switching between "states"? For example, I'm trying to make an element immediately higher upon hover then on 'mouseout' to wait a second before sliding back to the element's initial height. Demo page: jsfiddle.net/RTj9K (hover black box in top-right corner) CSS: #bar { transition:.4s ease-out 0, 1s; } I thought the timings on the end related to delay but it doesn't seem to be working the way I'd imagined. If you want different CSS transition delays on hover and mouseout , you have to set them using the relevant selectors. In the

Disable/turn off inherited CSS3 transitions

无人久伴 提交于 2019-11-28 16:07:28
问题 So i have the following css transitions attached to the a element: a { -webkit-transition:color 0.1s ease-in, background-color 0.1s ease-in ; -moz-transition:color 0.1s ease-in, background-color 0.1s ease-in; -o-transition:color 0.1s ease-in, background-color 0.1s ease-in; transition:color 0.1s ease-in, background-color 0.1s ease-in; } Is there a way to disable these inherited transitions on specific a elements? a.tags { transition: none; } Doesn't seem to be doing the job. 回答1: The use of

Apply Transition effect when adding and remove class

只愿长相守 提交于 2019-11-28 13:42:45
Trying to add sliding transition effect when add and remove class. Tried to this sticky nav js below: lastScroll = 0; $(window).on('scroll',function() { var scroll = $(window).scrollTop(); if(scroll === 0){ $(".nav").removeClass("darkHeader"); } else if(lastScroll - scroll > 0) { $(".nav").addClass("darkHeader"); } else { $(".nav").removeClass("darkHeader"); } lastScroll = scroll; }); My Try: lastScroll = 0; $(window).on('scroll',function() { var scroll = $(window).scrollTop(); if(scroll === 0){ $(".nav").removeClass("darkHeader", 1000, "easeInOutQuad"); } else if(lastScroll - scroll > 0) { $(

CSS3 Transitions: is there an on click option without using JQuery?

北城余情 提交于 2019-11-28 09:11:58
This works great: <style type="text/css"> div { width:100px; height:100px; background:red; transition:width 2s; -moz-transition:width 2s; /* Firefox 4 */ -webkit-transition:width 2s; /* Safari and Chrome */ -o-transition:width 2s; /* Opera */ } div:hover { width:300px; } </style> But does anyone know of a way to do this using click instead of hover? And not involving JQuery? Thanks! You can write like this: CSS input{display:none} .ani { width:100px; height:100px; background:red; transition:width 2s; -moz-transition:width 2s; /* Firefox 4 */ -webkit-transition:width 2s; /* Safari and Chrome */

Increase and decrease radius of a circle using d3 transition

梦想的初衷 提交于 2019-11-28 03:13:14
问题 I am trying to create a pulse effect on a circle by increasing and decreasing its radius. I would like the circle to grow and shrink based on a given data set. I can only get the transition function to ether increase or decrease the radius but not both. d3 automatically creates a different circle for each value in the array. How can I make it so that one circle's radius grows and shrinks as it iterates through the array? a simple version of what I have so far is below. Thanks for any help you