transition

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) { $(

D3 SVG transform rotation transition behaving weirdly

冷暖自知 提交于 2019-11-28 12:48:17
问题 I generated a geometric SVG pattern with D3 and I wanted to animate it. I wanted to have the circles and square spinning around their centre. However when they rotate the centre point moves along an elliptical path before returning to the correct position. My codepen is here: http://codepen.io/andybarefoot/pen/bwkjaN Clicking "spin" in the top left corner shows the unusual behaviour. My key function for rotating the "group" looks like this: function spinCircles() { d3 .select("#fixedGroup")

Vue教程(动画-基础入门)

让人想犯罪 __ 提交于 2019-11-28 12:16:19
原文: http://blog.gqylpy.com/gqy/424 置顶:来自一名75后老程序员的武林秘籍——必读 (博主推荐) 来,先呈上武林秘籍链接: http://blog.gqylpy.com/gqy/401/ 你好,我是一名极客!一个 75 后的老工程师! 我将花两分钟,表述清楚我让你读这段文字的目的! 如果你看过武侠小说,你可以把这个经历理解为,你失足落入一个山洞遇到了一位垂暮的老者!而这位老者打算传你一套武功秘籍! 没错,我就是这个老者! 干研发 20 多年了!我也年轻过,奋斗过!我会画原理图,会画 PCB,会模拟,会数字!玩过 PLC,玩过单片机,会用汇编,会用 C!玩过 ARM,比如 PLC,STM32,和时下正在起飞的 NXP RT1052!搞过 DSP,比如 TMS320F28335!搞过 FPGA,不管 Xilinx 还是 Altera,也不管是 Verilog 还是 VHDL,或者直接画数字电路图!我懂嵌入式系统,比如 uCOS 和 Linux!我懂开源的硬件,比如 Arduino 和树莓派!我也搞软件,学了一堆上位机的语言C#,JAVA,Python,Kotlin,Swift!会写爬虫工具,又自学写APP,不管Android 还是 IOS! 可是这一切有什么用呢?土鸡瓦狗!不值一提!干技术的永远就是最苦逼的那个人! 我相信看到这里的你,应该是个 IT

Optimizing transition/movement smoothness for a 2D flash game

怎甘沉沦 提交于 2019-11-28 11:47:42
Update 6 : Fenomenas suggested me to re-create everything as simple as possible. I had my doubts that this would make any difference as the algorithm remains the same, and performance did not seem to be the issue. Anyway, it was the only suggestion I got so here it is: 30 FPS: http://www.feedpostal.com/test/simple/30/SimpleMovement.html 40 FPS: http://www.feedpostal.com/test/simple/40/SimpleMovement.html 60 FPS: http://www.feedpostal.com/test/simple/60/SimpleMovement.html 100 FPS: http://www.feedpostal.com/test/simple/100/SimpleMovement.html The code: package { import flash.display.Sprite;

CSS3 transform difference in Firefox and Chrome and IE

血红的双手。 提交于 2019-11-28 11:38:46
问题 I think it may have something to do with a pseudo element, but I'm not sure. I am having difficulties with the effect of a transform transition using css3. In Firefox v24, the effect works as I want it to - see the CodePen here http://codepen.io/patrickwc/pen/aKEec but in Chrome and IE, the border effect of the links animate and then suddenly switch back into position. It is difficult to describe so the best way is to look at the effect in Firefox then in Chrome or IE. body { background: #000

003 Vue动画

非 Y 不嫁゛ 提交于 2019-11-28 11:06:41
一: 1.不使用动画 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <script src="./lib/vue-2.4.0.js"></script> </head> <body> <div id="app"> <input type="button" value="toggle" @click="flag=!flag"> <!-- 需求: 点击按钮,让 h3 显示,再点击,让 h3 隐藏 --> <h3 v-if="flag">这是一个H3</h3> </div> <script> // 创建 Vue 实例,得到 ViewModel var vm = new Vue({ el: '#app', data: { flag: false }, methods: {} }); </script> </body> </html>    2.使用过度类名实现动画 <!DOCTYPE html> <html lang=

Using D3 transition method with data for scatter plot

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-28 10:57:29
So I'm new to D3 and have little exp with JavaScript in general. So I have been following some tutorials am currently using source code that creates a basic scatter plot. Now my question is how do I use the transition() method to moves the circles around when I add more datasets? I want to be able to set up buttons and when a user presses them, it activates the transition() method with the corresponding dataset. The tutorial I read on transitions only showed a transition on a single rectangle and did it manually, without data, and not with multiple items //Width and height var w = 900; var h =

Looping Animation of text color change using CSS3

99封情书 提交于 2019-11-28 09:52:31
I have text that I want to animate. Not on hover, for example but continually changing slowly from white to red and then back to white again. Here is my CSS code so far: #countText{ color: #eeeeee; font-family: "League Gothic", Impact, sans-serif; line-height: 0.9em; letter-spacing: 0.02em; text-transform: uppercase; text-shadow: 0px 0px 6px ; font-size: 210px; } Sourabh Use keyframes and animation property HTML <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Qui ad quos autem beatae nulla in.</p> CSS p{ -webkit-animation: color-change 1s infinite; -moz-animation: color-change 1s

h5-360_introduce页面案例

本秂侑毒 提交于 2019-11-28 09:51:08
整个网页的html 首先,忽略我的网页比较丑,主要是ps功底不太好, 其次这个网页是利用了全屏插件:jquery.fullPage.js。需要事先导入相应的js文件 js文件下载地址:http://www.dowebok.com/77.html js文件网页中有使用教程和一些小案例 整个案例运用了交集选择器 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Title</title> 6 <link href="../css/360.css" rel="stylesheet"> 7 <link rel="stylesheet" href="../css/jquery.fullPage.css"> 8 <script src="../js/jquery-1.8.3.min.js"></script> 9 <script src="../js/jquery.fullPage.js"></script> 10 <script src="../js/jquery.fullPage.min.js"></script> 11 <style> 12 13 </style> 14 </head> 15 <body> 16 <div id="360Page"> 17 <div class=

css transition opacity fade background

非 Y 不嫁゛ 提交于 2019-11-28 08:57:30
I am doing a transition where it fades into transparent white, when a user is hovering an image. My problem is that I need to change the color, that it fades to, to black. I have tried just simply adding background:black; to the class that contains the transition , but it does not work unfurtunately, it's still fading into white transparent. The css code I am using is: .hover:hover { opacity: 0.2; } .item-fade { background: black; opacity: 0.8; transition: opacity .25s ease-in-out; -moz-transition: opacity .25s ease-in-out; -webkit-transition: opacity .25s ease-in-out; } <p>Hover image, the