transition

VueRouter路径切换过渡动画

十年热恋 提交于 2019-11-28 08:14:31
实现简单的页面切换淡入淡出效果 < template > < div id = " app " > < transition name = " fade " mode = " out-in " > < router-view > </ router-view > </ transition > </ div > </ template > < script > export default { name : "App" } ; </ script > < style > #app { margin : 0 ; padding : 0 ; } .fade-enter-active, .fade-leave-avtive { transition : opacity 0.3s ; } .fade-enter, .fade-leave-to { opacity : 0 ; } </ style > 来源: https://blog.csdn.net/AK852369/article/details/100043149

Android - How to animate an activity transition when the default back button is pressed

試著忘記壹切 提交于 2019-11-28 06:43:58
In my activity, I have a button with the following click listener that is working great: final ImageButton startOverButton = (ImageButton) findViewById(R.id.start_over_button); startOverButton.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(final View v) { finish();//go back to the previous Activity overridePendingTransition(R.anim.comming_in, R.anim.comming_out); } }); It animates the return to the previous activity the way I want. However, when the user presses the Android default back button, the animation is not triggered. My question is: where should I put the

how to implement an iPhone view transition animation with both flipping and scaling?

巧了我就是萌 提交于 2019-11-28 05:35:21
how can I implement the animation we see in the iPhone Music app's coverflow screen? when you click on a small view, it flips and scales up to another view? how can I do this? I can use core animation to flip and scale a view, but how can I do the transition to another view? thanks You need an UIView as Container for the two UIView s (frontside/backside) and then remove/add these from/to the container as subviews while doing the animations in between: UIView *flipContainer; UIView *frontSide; UIView *backSide; //... -(void)turnUp { [backSide removeFromSuperview]; [UIView beginAnimations:nil

d3: How to properly chain transitions on different selections

为君一笑 提交于 2019-11-28 04:44:09
I am using V3 of the popular d3 library and basically want to have three transitions, followed by each other: The first transition should apply to the exit selection, the second to the update selection and the third to the enter selection. They should be chained in such a manner that when one of the selections is empty, its respective transition is skipped. I.e. when there is no exit selection, the update selection should start immediately. So far, I have come up with this code (using the delay function). // DATA JOIN var items = d3.select('#data').selectAll('.item'); items = items.data(data,

How to change all the activity transitions at once in Android application?

六眼飞鱼酱① 提交于 2019-11-28 04:06:43
I know I can change activity transition using the following code right after startActivity() or finish() activity.overridePendingTransition(R.anim.activity_close_enter, R.anim.activity_close_exit); But if I have ten activities in my app, I have to do that ten times; and it is quite hard to modify. So I'm wondering if there is a way to set transition for all activities within the application at once. Is there any corresponding configuration in AndroidManifest.xml? Thanks! gianpi You want to first create a <style> in res/styles.xml, like this: <style name="YourAnimation.Activity" parent="

Animation transition between activities using FLAG_ACTIVITY_CLEAR_TOP

跟風遠走 提交于 2019-11-28 03:23:59
In my android app, I'm making a method that pop all activities and bring up the first activity. I use this code: Intent intent = new Intent(this, MMConnection.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); this.startActivity(intent); As I noticed that the transition was still a left to right animation, does someone know if there is a way to change system animation when starting an activity? Actually, I'd ideally like to have a right to left transition (like when the return button is tapped) thanks for help! E-Riz CoolMcGrr is right, you want to use overridePendingTransition(int

iPhone - presentModalViewController with transition from right

不打扰是莪最后的温柔 提交于 2019-11-28 02:18:04
问题 I'm using presentModalView controller and pushing the transition to new view via its controller. And I'm using following code to do the transition (which is working fine) [self presentModalViewController:myViewController animated:NO]; CATransition *animation = [CATransition animation]; [animation setDuration:0.5]; [animation setType:kCATransitionPush]; [animation setSubtype:kCATransitionFromRight]; [animation setTimingFunction:[CAMediaTimingFunction functionWithName

h5-过度

这一生的挚爱 提交于 2019-11-28 00:35:00
1.过度的基本介绍及写法 1 .div{ 2 width: 200px; 3 height: 200px; 4 background-color: red; 5 position: absolute; 6 left: 100px; 7 top: 100px; 8 /*简写:transition:属性名称 过度时间 时间函数 延迟*/ 9 /*transition: left 2s linear 0s;*/ 10 /*多个样式添加*/ 11 /*transition: left 2s linear 0s,background-color 2s linear 0s;*/ 12 /*为多个样式同时添加过度样式 all:所有样式 13 效率低下,避免用 14 steps(4):可以让过度效果分为制定的几次来完成 15 */ 16 transition: all 2s steps(4); 17 -moz-transition: all 2s steps(4); 18 -webkit-transition: all 2s steps(4); 19 -o-animation: all 2s steps(4); 20 } 2.过度小案例:伸缩菜单项 2.1.html代码 1 <div class="menu"> 2 <div class="item"> 3 <h3>市内新闻</h3> 4 <div

CSS编码规范

我是研究僧i 提交于 2019-11-27 23:40:54
CSS编码规范 本文档的目标是使CSS代码风格保持一致,容易被理解和被维护,如果自己没有这种习惯,请好好选择你的IDE,别再用“文本编辑器”。 本文档虽针对CSS设计的,但是在使用各种CSS的预编译器(如less、sass、stylus等)时,适用的部分也应尽量遵循本文档的约定。 1 代码风格 1.1 文件 [建议] CSS 文件使用无 BOM 的 UTF-8 编码。 解释: UTF-8 编码具有更广泛的适应性。BOM 在使用程序或工具处理文件时可能造成不必要的干扰。 1.2 缩进 [强制] 使用 2 个空格做为一个缩进层级,不允许使用 tab 字符。 示例: .selector { margin : 0 ; padding : 0 ; } 1.3 空格 [强制] 选择器 与 { 之间必须包含空格。 示例: .selector { } [强制] 属性名 与之后的 : 之间不允许包含空格, : 与 属性值 之间必须包含空格。 示例: margin : 0 ; [强制] 列表型属性值 书写在单行时, , 后必须跟一个空格。 示例: font-family : Arial , sans-serif ; 1.4 行长度 [强制] 每行不得超过 120 个字符,除非单行不可分割。 解释: 常见不可分割的场景为URL超长。 [建议] 对于超长的样式,在样式值的 空格 处或 , 后换行

Vue实现移动端页面切换效果

时光毁灭记忆、已成空白 提交于 2019-11-27 23:39:04
找了好多博客实现效果都……emmm…… 应用Vue自带的过渡 《 进入/离开 & 列表过渡 》和 嵌套路由 和 fixed定位实现 其实还是挺简单的。 在子页面把整个页面做绝对定位,覆盖整个屏幕,子父页面将 router-view 用 transition 套起来,并加上过渡动画就可以啦。 代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> <title>Document</title> <style> * { padding: 0; margin: 0; } html, body, #app { width: 100%; height: 100%; } .one { height: 100%; background-color: yellow; } .two { background-color: tomato; position: fixed; top: 0; bottom: 0; left: 0; right: 0; } .three {