transition

简单的不是算法的算法

有些话、适合烂在心里 提交于 2019-11-29 19:20:09
目录 Python实现进制转换 要求 Python找假币算法实现 要求:有一枚假币混在一些真币中,已知假币比真币轻一些。总共n枚硬币中(包含一枚假币),给一个天平,请用最少的次数找出这枚假币。 Python实现进制转换 要求 通过输入十进制根据输入的转换成相应的进制 #外层while循环 while True: #用于存放转换后的数字 lis = [] #输入转换的数字 transition = input('请输入你要转换的数字').strip() #判断是否为数字 if not transition.isdigit(): continue system = input('请输入要转换的进制').strip() if not system.isdigit(): continue #转换为数字类型 transition = int(transition) system = int(system) #对余数大于10的进制进行处理 while transition!=0: if transition%system<10: lis.append(transition%system) else: if transition%system == 10: lis.append('A') if transition%system == 11: lis.append('B') if

Vue多元素过渡

拜拜、爱过 提交于 2019-11-29 18:34:26
transition包含v-if v-else显示和隐藏元素的时候,两个元素同时发生过渡 <style> .fade-enter,.fade-leave-to{opacity:0;} .fade-enter-active,.fade-leave-active{transition:opacity .5s;} </style> <div id="demo"> <button @click="clear">清空数据</button> <button @click="reset">重置</button> <transition name="fade"> <ul v-if="items.length > 0"> <li v-for="item in items">{{item}}</li> </ul> <p v-else>Sorry, no items found.</p> </transition> </div> <script> new Vue({ el: '#demo', data: { items: ['html','css','js'] }, methods:{ clear(){ this.items.splice(0); }, reset(){ history.go(); } } }) </script> 清空列表的时候,列表逐渐消失,同时文字逐渐出现,文字先放在列表后面

过渡属性transition

自古美人都是妖i 提交于 2019-11-29 18:29:13
过渡属性:使元素变化过程可见 transition: all 1s;元素所有变化过程都可见 transition: 1s;元素所有变化过程都可见 transition: 指定属性 2s 1s;指定属性变化过程可见,过渡时间2s,延迟1s,过渡时间和延迟时间顺便不可以调整 案例: (1)html <div></div> (2)css div{ width: 100px; height: 100px; background: red; transition: width 2s,height 2s 1s; } div:hover{ width: 200px; height: 200px; background: lime; } 来源: https://www.cnblogs.com/msw0803/p/11526195.html

博客园皮肤

好久不见. 提交于 2019-11-29 18:23:16
主题地址 silence 博客皮肤 blacklowkey 页面定制css代码 body{background:#fff;min-height:100%!important;color:#314659!important;font-family:Lato,"PingFang SC","Microsoft YaHei",sans-serif!important}a{transition:all .3s ease!important}a:hover{color:#2D8CF0!important;text-decoration:none!important}#ad_c1,#ad_c2,#ad_t2,#author_profile,#blogCalendar,#blogTitle h2,#comment_form_container p:nth-of-type(3),#comments_pager_top,#green_channel,#homepage_top_pager,#sidebar_imagecategory,#sidebar_postarchive,#sidebar_recentcomments,#sidebar_recentposts,#sidebar_scorerank,#sidebar_search,#sidebar_shortcut,#sidebar

transition 用法

耗尽温柔 提交于 2019-11-29 18:22:13
一、animation有哪些属性值 animation-name 规则名称 animation-duration 动画时间 animation-timing-function animation-delay animation-iteration-count animation-direction 二、transition有哪些属性: transition-property 对哪个属性设置过渡 transition-duration 过渡周期 transition-timing-function速度曲线 transition-delay 延迟时间 合写 transition: property duration timing-function delay; 设置多个属性用逗号 transition: width .2s linear .3s , height .2s linear .3s; 速度曲线有哪些 linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(n,n,n,n) linear:规定以相同速度开始至结束的过渡效果(等于cubic-bezier(0,0,1,1) ease:慢速开始然后变快然后慢速结束 ease-in:慢速开始 ease-out:慢速结束 ease-in-out:慢速开始,慢速结束 cubic

D3 SVG transform rotation transition behaving weirdly

血红的双手。 提交于 2019-11-29 18:17:47
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") .attr("transform", "translate (0, 0) rotate(0)") .transition() .duration(4000) .attr("transform",

CSS3 transform difference in Firefox and Chrome and IE

纵饮孤独 提交于 2019-11-29 17:34:13
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; color: #fff; } p { text-align: center; } nav.footer-social-links a { position: relative; margin: 0

css3—animation动画和transition详解(最新)

╄→尐↘猪︶ㄣ 提交于 2019-11-29 17:20:43
animation和transition两个属性在网页制作时候用到频率非常之高!这篇文章来详细记录下两者的用法: 一、animation动画 (1)定义: 帧动画,用@keyframes 来创建animation的关键帧: @keyframes run { from{} 50%{} to{} } 指定动画的变换状态用 % ,from 代表 0% ,to 代表 100% ,也可以写成这样: @keyframes run{ 0%{} 50%{} 100%{} } 中间的帧状态 (百分之xxx)自己看情况而定,上边我定义的是50%。 (2)animation的8个属性: animation-name:run; @keyframes定义的名字 animation-duration : 5s; 动画持续的时间 animation-timing-function : ease-in-out; 动画播放速度的曲线效果 常用的配置参数: (1)ease:开始缓慢,慢慢加快,结束时慢 (2)ease-in:动画缓慢的开始 (3)ease-out:动画缓慢结束 (4)ease-in-out:动画具有缓慢的开始和缓慢的结束 (5)linear:动画从开始到结束有相同的速度 (6)cubic-bezier(number,number,number,number): animation-delay : 0s

CSS3基础

江枫思渺然 提交于 2019-11-29 16:34:17
内容: 1.圆角 border-radius 2.阴影 text-shadow、box-shadow 3.渐变 linear、radial 4.rgba rgb+alpha opacity 5.transform 6.动画 transition、animation 1.圆角 border-radius 通过设置元素的border-radius值,可以轻松给元素设置圆角边框,甚至实现绘制圆、半圆、四分之一的圆等各种圆角图形: (1)只设置一个值 只设置一个值得情况常用来给button加圆角边框,或者画一个圆形按钮,仅需设置一个数值,即可给元素的四个边角设置统一的圆角弧度 1 .box {width:300px; height:300px; background:#CCC; margin:10px auto 0; border-radius:10px;} 效果: (2)四个方向的值分别设置 border-radius属性其实是border-top-left-radius、border-top-right-radius、border-bottom-right-radius、border-bottom-left-radius四个属性的简写模式,因此,border-radius : 30px;,其实等价于border-radius : 30px 30px 30px 30px;

vue动画 css (animate.css) js(velocity.js)

橙三吉。 提交于 2019-11-29 16:34:15
1、动画实现的方式: ------动画在vue上的应用,实现过渡效果 (1)css3:transition、 animation、animate.css(框架) (2)js:jQuery、$animation({},{}) (框架);velocity 、 Velocity(el,{},{}) (框架) (1)使用css3技术实现: 原生css3:<transition>在渲染完毕之后是不存在的,div中会由vue添加一些样式 自定义过渡样式:通过transition组件,可以给任何元素和组件添加过渡; 条件渲染(使用v-if)、条件展示(使用v-show)、动态组件、组件根节点过渡类名 .v-enter(开始进入) .v-enter-to(进入结束) .v-enter-active(.v-enter到.v-enter-to的整个过程) .v-leave(开始出去) .v-leave-to(出去结束) .v-leave-active(.v-leave到.v-leave-to的整个过程) <script src="../js/vue.js"></script> <style> /* 过程 */ .v-enter-active,.v-leave-active{ transition: opacity 2s; } /*进入结束 开始出去 */ .v-enter-to,.v-leave{