transition

“From View Controller” disappears using UIViewControllerContextTransitioning

偶尔善良 提交于 2019-11-26 21:11:12
I got one problem and i have described it below. I am using UIViewControllerContextTransitioning for custom transitions. I have 2 view controllers , first view controller and second view controller. Now i want to add secondview controller on first view controller with animation. I have achieved it, now I have secondview controller transparent , so we can see first view controller below secondview controller. But i am not able to see first view controller , and i can see only black screen below secondview controller. Here is the code. -(void)animateTransition:(id

类似 select 选择框效果及美化

你说的曾经没有我的故事 提交于 2019-11-26 21:08:48
网上有各种各样的关于 select 选择框的美化,找了很多,并没有好的样式效果。所以就找了一个利用 ul li 做的类似 select 选择框的效果,不废话了,先上图,效果如下: 对于上图的箭头效果,可以看看我上篇博客 点击这里 点击一个 test ,就会把列表显示出来,再次点击,列表隐藏,选择一个 li ,就会把 span 里的内容替换成 li 的内容,然后可以用 js 监控 span 的变化,然后执行你的代码。效果如下: html 代码如下: <div id="type" class="test"> <span>投资种类</span> <ul class="dropdown"> <li>期货</li> <li>股票</li> <li>期权</li> </ul> </div> <div id="kind" class="test"> <span>投资类型</span> <ul class="dropdown"> <li>趋势</li> <li>震荡</li> <li>套利</li> <li>选股</li> <li>择时</li> </ul> </div> css 代码如下: ul li{ list-style: none; } .test { position: relative; float: left; width: 120px; height: 40px; padding

vuebase-5.过渡和动画

亡梦爱人 提交于 2019-11-26 19:40:42
动画的方案: 1.在 CSS 过渡和动画中自动应用 class 2.可以配合使用第三方 CSS 动画库,如 Animate.css 3.在过渡钩子函数中使用 JavaScript 直接操作 DOM 4.可以配合使用第三方 JavaScript 动画库,如 Velocity.js ----------- 实现动画的元素必须脱离文档流 过渡的类名: 在进入/离开的过渡中,会有 6 个 class 切换。 v-enter :定义进入过渡的开始状态。在元素被插入之前生效,在元素被插入之后的下一帧移除。 v-enter-active :定义进入过渡生效时的状态。在整个进入过渡的阶段中应用,在元素被插入之前生效,在过渡/动画完成之后移除。这个类可以被用来定义进入过渡的过程时间,延迟和曲线函数。 v-enter-to : 2.1.8版及以上 定义进入过渡的结束状态。在元素被插入之后下一帧生效 (与此同时 v-enter 被移除),在过渡/动画完成之后移除。 v-leave : 定义离开过渡的开始状态。在离开过渡被触发时立刻生效,下一帧被移除。 v-leave-active :定义离开过渡生效时的状态。在整个离开过渡的阶段中应用,在离开过渡被触发时立刻生效,在过渡/动画完成之后移除。这个类可以被用来定义离开过渡的过程时间,延迟和曲线函数。 v-leave-to : 2.1.8版及以上

How to Fade In/Out multiple texts using CSS/jQuery like on Droplr?

房东的猫 提交于 2019-11-26 19:38:14
问题 I've seen this type of animation on a website just when CSS3 key-frames started to gain momentum, but couldn't find it nor could I replicate it using CSS or jQuery, and here's where I thought some of you could help. I've animated what I hope to achieve and I've embedded it below. I believe this can be coded using the new CSS3 key-frames or jQuery's .animate(); feature. I don't know. I've tried everything I know, but all in vain. Here's the GIF animation of what I wanted: I just noticed, http:

Change and transition dataset in chord diagram with D3

落爺英雄遲暮 提交于 2019-11-26 19:37:53
问题 I'm working on a chord diagram using D3. I am trying to make it so that when a user clicks on a link the dataset will change to another predefined dataset. I've looked at both http://exposedata.com/tutorial/chord/latest.html and http://fleetinbeing.net/d3e/chord.html, and have tried to use some elements in there to get it to work. Here is the JavaScript to create the "default" diagram: var dataset = "data/all_trips.json"; var width = 650, height = 600, outerRadius = Math.min(width, height) /

CSS3 过渡

℡╲_俬逩灬. 提交于 2019-11-26 19:16:57
过渡:执行一定操作后某属性从指定状态过渡到另一状态。1.指定要添加效果的CSS属性。 2.指定效果的持续时间。 div{ transition: width 2s; -webkit-transition: width 2s; /* Safari */ } div:hover{ width:300px; } 也可以同时改变多个属性 div{ transition: width 2s, height 2s, transform 2s; -webkit-transition: width 2s, height 2s, -webkit-transform 2s; } transition的四个属性如下: div{ transition: 属性名 过渡时间 过渡效果的时间曲线 开始的延迟时间 -webkit-transition:属性名 过渡时间 过渡效果的时间曲线 开始的延迟时间 } 属性名:width height background-color; 过渡时间:2s; 过渡效果的时间曲线: linear ease ease-in ease-out ease-in-out; 开始的延迟时间:2s; 来源: https://www.cnblogs.com/xihailong/p/11935488.html

d3.js how to dynamically add nodes to a tree

断了今生、忘了曾经 提交于 2019-11-26 18:58:41
问题 I am using a d3.js tree, and would like to add nodes dynamically, rather than pre-loading the entire tree. How would i modify the following in order to dynamically add additional JSON nodes when a node is clicked? (see link below, and code below) http://mbostock.github.com/d3/talk/20111018/tree.html So rather than pre-loading the entire tree, instead i would like to retrieve the child nodes only when the parent is clicked. I can retrieve the json for the child nodes in the toggle function,

Main Menu In Swift

跟風遠走 提交于 2019-11-26 18:38:52
问题 I would like to create a main menu for my game in swift. I am using the following code: import SpriteKit class menuScene: SKScene { //Adding Start Button let startButton = SKSpriteNode(imageNamed: "playButton") override func didMove(to view: SKView) { //Temporary Background backgroundColor = SKColor.darkGray //Start Button startButton.position = CGPoint(x: size.width / 2, y: size.height / 2) addChild(startButton) } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

CSS: pure CSS scroll animation

孤街醉人 提交于 2019-11-26 18:18:31
I have been looking for a way to scroll down when clicking on a button that is located on top of a page using CSS3 only. So I've found this tutorial: http://tympanus.net/codrops/2012/06/12/css-only-responsive-layout-with-smooth-transitions/ Demo: http://tympanus.net/Tutorials/SmoothTransitionsResponsiveLayout/ But it's a bit too advanced for my needs since I just want the browser to scroll down on a click on one button located on top of the page, so I was wondering: is it possible to do those CSS scrolls without the input buttons, just with an anchor tag? HTML looks like this: <a href="#"

Implement page curl on android?

一笑奈何 提交于 2019-11-26 17:44:52
问题 I was surfing the net looking for a nice effect for turning pages on Android and there just doesn't seem to be one. Since I'm learning the platform it seemed like a nice thing to be able to do is this. I managed to find a page here: http://wdnuon.blogspot.com/2010/05/implementing-ibooks-page-curling-using.html - (void)deform { Vertex2f vi; // Current input vertex Vertex3f v1; // First stage of the deformation Vertex3f *vo; // Pointer to the finished vertex CGFloat R, r, beta; for (ushort ii =