transition

iOS7, backgroundImage for UISearchBar

不想你离开。 提交于 2019-12-18 11:03:09
问题 I'm making the transition of the UI between iOS 6 and iOS 7. We have a UISearchBar related to a UISearchDisplayController, I have set the backgroundImage of the navigationBar and the searchBar to a 1x1 image dynamically created with a color. self.searchDisplayController.searchBar.translucent = NO; self.searchDisplayController.searchBar.barTintColor = [UIColor clearColor]; self.searchDisplayController.searchBar.tintColor = [UIColor myTintColor]; self.searchDisplayController.searchBar

Iphone navigate to previous/next viewController

拥有回忆 提交于 2019-12-18 07:17:06
问题 I have a viewController that displays the result of a query using a tableview). By taping on a row a I push a the childView and I set a navigationBar that contains 2 buttons on the right (Previous/Next). My question is : How can I switch to the previous or next "childView" when I tap on previous or next button? I would like to have also a transition effect while the view is switching? Any help? 回答1: I had a view that contained a list of camps, and touching one takes users to the camp details.

CSS属性——transform

孤街浪徒 提交于 2019-12-18 03:55:31
原则 : 对谁做过渡,过渡效果就加在谁身上. 一、2D变形—移动 translate : 在2D范围内移动 可以单独设置X、Y轴,也可以结合使用 transition : 结合translate使用,过渡效果的属性、时间以及何种效果 < ! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < title > < / title > < style > div { width : 100 px ; height : 100 px ; background - color : green ; /*设置过渡效果*/ transition : all 0.5 s linear ; } div : hover { /*transform: translateX(100px);*/ /*transform: translateY(100px);*/ transform : translate ( 100 px , 200 px ) ; } < / style > < / head > < body > < div > 我要移动 < / div > < / body > < / html > 运行效果: 在0.5秒内,匀速移动,X轴移动100px,Y轴移动200px 二、2D变形—缩放 scale :

Add transition while changing img src with javascript

北战南征 提交于 2019-12-18 03:53:41
问题 I have an img tag that I want to change the src when hover and it all works but i would like to add some transition so it doesn't look so rough but since it's an img src i cant target it with css. http://jsfiddle.net/Ne5zw/1/ html <img id="bg" src="img/img1.jpg"> <div onmouseover="imgChange('img/img2.jpg'); "onmouseout="imgChange('img/img1.jpg');"> js function imgChange(im){ document.getElementById('bg').src=(im); } 回答1: You want a crossfade. Basically you need to position both images on top

CSS Transition for only one type of transform?

旧时模样 提交于 2019-12-18 03:03:54
问题 Is it possible to animate (using transitions) only one type of css transform? I have css: cell{ transform: scale(2) translate(100px, 200px); transition: All 0.25s; } Now, I want only scale to be animated. In this case I could use position:absolute and left/right properties but I far as I remember, translate() is much better in performance. I would also like to avoid using additional html elements. Fiddle: http://jsfiddle.net/6UE28/2/ 回答1: Yes! You separate it into two selectors, one of them

CSS样式

你离开我真会死。 提交于 2019-12-18 02:23:36
transition: property duration timing-function delay; 展示地址:http://www.w3school.com.cn/cssref/pr_transition.asp <!DOCTYPE html> <html> <head> <style> div { width:100px; height:100px; background:blue; 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> </head> <body> <div></div> 浏览器支持情况: Internet Explorer 10、Firefox、Opera 和 Chrome 支持 transition 属性。 Safari 支持替代的 -webkit-transition 属性。 注释:Internet Explorer 9 以及更早版本的浏览器不支持 transition 属性。 transition 属性是一个简写属性

过渡 - transition

青春壹個敷衍的年華 提交于 2019-12-18 00:19:39
过渡 - transition 是变形 transfrom 其中一种效果,定义为一种状态过渡到另一种状态的过程,今天学习到css3动画,特此记录下过渡的使用和一些效果。 实例1: <div class="box"></div> <p>鼠标移动到 .box 元素上,查看过渡效果。</p> .box{ width: 100px; height: 100px; background: red; margin: 0 auto; transition-duration: 1s; /*花费时间*/ transition-property: all; transition-delay:0s; /* 延迟 */ transition-timing-function: linear; /*匀速*/ } .box:hover{ width:200px; background: #00FFFF; } 效果图: 注:当指针移出元素时,它会逐渐变回原来的样式。 实例2: 在例子中使用所有过渡属性 - 使用简写 .box{ .box{ width: 100px; height: 100px; background: red; margin: 0 auto; transition:1s all 0s linear; } 效果图还是这样: -------------------------------------

纯CSS Material Design风格按钮

只谈情不闲聊 提交于 2019-12-17 22:57:59
其实Material Design的扁平化icon按钮,这类型的按钮往往只利用几何色块的变化,就能抓住使用者的眼光,并且从几何形状中明白按钮的含意,这也是Material Design非常强调的设计理念和精髓。 应用重点与原理 在这篇我纯粹利用CSS,就做出了Material Design风格的按钮,其实没有很难,比较需要知道的重点如下: 伪元素before和after的应用 伪元素在里头扮演相当重要的角色,利用伪元素我们可以产生两个不在HTML里头的类div,可以大幅降低代码的复杂程度。 div的自身宽度与边框 由于我们要进行三角形与矩形之间的形变,虽然三角形可由边框产生,但却无法做出漂亮的形变效果(用背景色的话就会有淡入淡出的现象),所以必须要用边框宽度和矩形大小去搭配,当边框变细的时候,矩形变大,如此一来就可以做出三角形与矩形互相变换的效果啰,下图的红色是纯粹用颜色变换,蓝色则是用边框宽度与div宽度变换,效果应该很明显吧! transform的应用 CSS里所有的形变都是藉由transform来完成(必要时请加各个浏览器的前坠字),示例里头会用到scale与rotate这两个变形属性。 实现Material Design风格按钮 了解原理之后,先来看一下HTML代码,代码里面有两个主要的div分别是a和b,a的话是利用伪元素来进行变换,b的内容还有三个小i分别是b1

Real time line graph with nvd3.js

两盒软妹~` 提交于 2019-12-17 22:19:50
问题 I am trying to create a real time graph using nvd3.js which would be updated periodically and with the impression that the data is processed in real time. For now I have been able to create a function which would update the graph periodically but I cannot manage to have a smooth transition between "states" like the line doing a transition to the left. Here is what I did using nvd3.js , here the interesting code is: d3.select('#chart svg') .datum(data) .transition().duration(duration) .call

iOS 7 Weather app expand/collapse transition

空扰寡人 提交于 2019-12-17 20:42:25
问题 I'm trying to achieve a view transition like the new iOS7 weather app transition, using a collapsing/expanding view. Does anyone know if a lib already exist for that ? Thanks 回答1: User antol put some effort into replicating the behavior: https://github.com/Antol/APPaginalTableView But note that APPaginalTableView doesn't have a separate controller for the expanded pages. You can see it in action here: https://www.youtube.com/watch?v=X1YvxDMr0yA 回答2: EDIT Check out this project. It