fade

记录一下vue transition 过渡各状态()

走远了吗. 提交于 2019-11-28 20:09:05
.slide-fade-enter{ opacity: 0; transform: translateX(100px); /*从哪里开始过渡:在过渡之前我就把位置定义在100px的位置,并且透明度从0开始回到默认值*/ } .slide-fade-enter-active{ /*进入过渡持续中*/ /*一般用于设置进入动画的事件和过渡曲线*/ transition: all 8s ease; } .slide-fade-enter-to{ background: red; /*从动画开始慢慢变到红色背景,进入动画完成后,移除红色背景*/ } .slide-fade-leave{ /*只持续一帧,没啥用*/ /*离开过渡前*/ } .slide-fade-leave-active{ /*离开过渡中*/ /*一般用于设置离开动画的事件和过渡曲线*/ transition: all 8s cubic-bezier(1.0, 0.5, 0.8, 1.0); } .slide-fade-leave-to{ /*离开过渡后*/ opacity: 0; transform: translateX(100px);/*过渡到那里去:在离开的过渡位置定义在100px的位置,透明度从默认值回到0*/ } 简写: /*.slide-fade-enter-active,.slide-fade-leave

Cocoa: NSView Animation

一个人想着一个人 提交于 2019-11-28 18:40:55
This is as simple as can be so I can't for the life of me find what's wrong, I looked through the documentation as a guide but it still didn't work. I have a view inside a larger view. An IBAction is supposed to fade out the inner view... that's it. Here's what I've got: NSViewAnimation *theAnim; NSMutableDictionary *viewDict; // Create the attributes dictionary for the view. viewDict = [NSMutableDictionary dictionaryWithCapacity:2]; // Set the target object to be the view. [viewDict setObject:_innerView forKey:NSViewAnimationTargetKey]; // Set this view to fade out [viewDict setObject

making the edge of the scrollview fade when scrolling in android

柔情痞子 提交于 2019-11-28 18:36:05
I have a ScrollView with an image in it. I want the edges of the ScrollView to make a fade effect when I scroll the image. I'm not talking about the effect you get when you get to the end of the scroll. I want the fade to always exist. That's what i did (not doing any effect): <ScrollView android:id="@+id/scrollView1" android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.84" android:background="@drawable/screen_nespresso" android:fadingEdge="horizontal" android:fadingEdgeLength="@dimen/padding_large" android:fillViewport="false" android

How to fade a UIVisualEffectView and/or UIBlurEffect in and out?

北城以北 提交于 2019-11-28 15:33:37
I want to fade a UIVisualEffectsView with a UIBlurEffect in and out: var blurEffectView = UIVisualEffectView() blurEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .dark)) I use a normal animation within a function called by a UIButton to fade it in, same for fading out but .alpha = 0 & hidden = true : blurEffectView.hidden = false UIView.animate(withDuration: 1, delay: 0, options: .curveEaseOut) { self.blurEffectView.alpha = 1 } Now, fading in both directions does work but it gives me an error when fading out : <UIVisualEffectView 0x7fdf5bcb6e80> is being asked to animate its

Javascript: Fade element from specidied opacity to specified opacity?

只谈情不闲聊 提交于 2019-11-28 12:30:37
问题 I am trying to find a function that can fade an element from a specified transparency to a specified transparency. For example from 0 to .7 but everything I can find just fades either from 0 to 1 or 1 to 0. I can't find anything that lets you specify from what to what. My attempts of reverse engineering the functions I have found have also failed as every example I have found has been pretty cryptic. Also I want to do this WITHOUT any frameworks. Thanks!! 回答1: There is no particular trick to

CSS Fade Between Background Images on Hover

假装没事ソ 提交于 2019-11-28 12:13:08
Is there a way that I can do the following? I have a transparent png sprite that shows a standard picture on the left, and a picture for the :hover state on the right. Is there a way that I can have the image fade from the left image into the right image on :hover using only css3 transitions? I've tried the following, but it doesn't work: li{-webkit-transition:all 0.5s linear; -moz-transition:all 0.5s linear; -o-transition:all 0.5s linear; transition:all 0.5s linear;} li{background:url(/img/sprites.png) 0 -50px no-repeat;} li:hover{background:url(/img/sprites.png) 0 -150px no-repeat;} Now, the

Can I have image alpha fade from left to right in java?

感情迁移 提交于 2019-11-28 11:51:32
I am making a game and want to have a single image 'fade' from left to right with the left part of the image having an alpha of 1.0 and the right having an alpha of 0.0. (note: I do not want it to be changing what it looks like over time, like fading in or out, but just fading from left to right and staying constant). An attempt to draw what I want the end result to look like is below: lll lll ll ll l l l l l lll lll ll ll l l l l l lll lll ll ll l l l l l lll lll ll ll l l l l l lll lll ll ll l l l l l lll lll ll ll l l l l l Where the densities of the 'l's represent the alpha I am currently

JQuery fade with loop and delay

倖福魔咒の 提交于 2019-11-28 11:35:52
I have 2 Divs stacked on top of each other. I need a really simple function that will: a) Wait for 3 seconds and then b) FadeOut the top Div to reveal the second Div c) Wait 3 seconds again and then d) FadeIn the top Div again e) Loop back again Can anyone offer any advice? Many thanks Here's an attempt. function foo() { jQuery("#mydiv").animate({opacity: 1.0}, {duration: 3000}) .animate({opacity: 0}, {duration: 3000}) .animate({opacity: 0}, {duration: 3000}) .animate({opacity: 1.0}, {duration: 3000, complete: foo}) } Note: To pause, just call animate over a property with the same target value

Fade the background-color of a span tag with JQuery

孤人 提交于 2019-11-28 08:58:51
I'm trying to fade the background-color of a span tag using JQuery to emphasize when a change has occured. I was thinking the code would be someting like the following inside the click handler, but I can't seem to get it working. Can you show me where I went wrong? Thanks Russ. $("span").fadeOut("slow").css("background-color").val("FFFF99"); That's better, but now it fades both the background-color of the span tag and the text value of the span tag too. I'm trying to just fade the background-color and leave the text visible. Can that be done? OH, I didn't realize you wanted to fade the color!

Cross-Fade between images with CSS in loop

耗尽温柔 提交于 2019-11-28 08:23:43
I want to fade between images in a loop (like result here- jsfiddle.net/5M2PD ) but purely through CSS , no JavaScript . I tried using key-frames but I wasn't successful. Please Help. @keyframes cf3FadeInOut { 0% { opacity:1; } 45% { opacity:1; } 55% { opacity:0; } 100% { opacity:0; } } #cf3 img.top { animation-name: cf3FadeInOut; animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-duration: 10s; animation-direction: alternate; } I have taken your fiddle as a base, and made it work without script. updated demo I needed to set an id to the HTML <div class=