opacity

Setting Opacity in CSS For Chrome

邮差的信 提交于 2019-12-10 15:21:09
问题 I've tried the following: (this is actually for fancybox, as the overlay does not show in chrome/safari: $("#fancy_overlay").css({<br /> 'background-color': opts.overlayColor,<br /> 'opacity': opts.overlayOpacity,<br /> '-moz-opacity': opts.overlayOpacity,<br /> '-khtml-opacity': opts.overlayOpacity,<br /> '-webkit-opacity:' : opts.overlayOpacity<br /> }).show(); And still nothing (in chrome/safari) What am I doing wrong? 回答1: opacity should work for chrome/safari/firefox. The -moz and -khtml

Change the opacity based on elements current offset

雨燕双飞 提交于 2019-12-10 15:12:59
问题 I try to set the opacity for some images, based on each current offset . The problem is, that the opacity is not equal to all images if you scroll far down. That's what I try to accomplish, for each image: ################ # # # # # # # === <= opacity 1 # # # *** <= opacity 0.6 # # ################ ... <= opacity 0 Currently it works only for the first ~2-3 images. All further down are not set from 0-1 , rather than from 0.5-40 or else. Another problem is, that if the scroll-offset is 0 , all

TextBlock brush giving incorrect color

北城余情 提交于 2019-12-10 13:39:33
问题 I have a TextBlock and a Rectangle, both sitting in an empty WPF4 window. The TextBlock's Foreground and the Rectangle's Fill are both set to a SolidColorBrush with value #80800000. This is what it looks like: The Rectangle's color is correct (a 50% transparent maroon) but the TextBlock gives a flat grey. What's going on? EDIT: Here's the XAML: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com

In jQuery, can you get the “target” opacity of an element that is fading?

烈酒焚心 提交于 2019-12-10 13:24:55
问题 I'd like to somehow get the target opacity (the final value it is being animated to) of an element that is fading. For example... $('body').fadeTo(0.4); // 0.4 $('body').fadeIn(); // 1 $('body').fadeOut(); // 0 $('body').animate({ opacity: 0.7 }); // 0.7 Is this doable in jQuery? Update For some background, see my answer here on Stack Overflow. I was trying to help out another user on SO and decided to ask this question that related to my answer. 回答1: jQuery uses step functions internally,

Jquery change opacity of div on click

拈花ヽ惹草 提交于 2019-12-10 12:20:01
问题 I've read various questions about this matter but I didn't found a solution for my particular case. I need to change opacity of the thumbUp and thumbDown divs when they are clicked. Why does my code not work? Thank you. HTML <body> <div id="container"> <div id="foto"> <img src="images/feu.jpg"> </div> <div id="descrizione"> <p class="title">Feu d'artifice</p> <p>Giacomo Balla<br> 1916-1917<br> </p> <div id="likeButtons"> <p>Ti piace quest'opera?</p> <img id="thumbUp" src="images/thumbup.png">

Fade only top part of div out as it reaches fixed navigation

萝らか妹 提交于 2019-12-10 11:23:07
问题 I'm trying to fade the top part of my content as it reaches a fixed nav bar with a translucent background. I've got it somewhat working, but you'll see 2 problems: All the content fades out, not just what's approaching the fixed nav. Content should fade at a line by line rate. All the content for all the other divs fade about because of the selector class. I'd appreciate any help! Thanks var divs = $('.section').children(); $(window).on('scroll', function() { var st = $(this).scrollTop();

How can I decrease opacity in unity?

为君一笑 提交于 2019-12-10 10:58:10
问题 I see this subject in stack over flow but I think it is false Making an object 'transparent' so it cannot be seen is not the most efficient way to do things. What you rather want to do is make the renderer inactive when you don't want to see it, and active when you do. If you click on your gameObject in the editor, there should be a Mesh Renderer as one of the components. To set it to inactive from a script attached to this same gameObject , you can do this... gameObject.GetComponent<Renderer

Picturebox slider control transparency

杀马特。学长 韩版系。学妹 提交于 2019-12-10 10:29:16
问题 I've a PictureBox in my form and load a image in it. I need this PictureBox to change the transparency (opacity, visibilit..etc), because I need the user to see the image behind this PictureBox better, so when he wants, he just drag the control slider and the image starts to turn invisible, step by step, until he finds its ok, lets say 50% transparency. I added the control slider but, cant find the way to do the rest. I tried the pictureBox.Opacity, pictureBox.Transparency, nothing works. 回答1

Overlapped elements with opacity and handling the 'hover' on those

余生长醉 提交于 2019-12-10 10:14:47
问题 This is a Q/A on how to handle the opacity of overlapping elements and make it consistent while hover, with a JS solution. Requirement The requirement is to develop two elements, which are transparent and overlapping, like the two red boxes below. These need to be transparent so that the background contents are visible. Now, while hover on any of these elements, the particular element should turn opaque like below. 回答1: There's a CSS only solution, which makes it a bit more efficient. Like

Change div opacity on scroll

耗尽温柔 提交于 2019-12-09 16:55:40
问题 How can I make it so that when you scroll down the page, the next DIV fades on top of the previous? I've set up this fiddle to illustrate it better: http://jsfiddle.net/meEf4/176/ So for example if you're halfway down the page, the background is blue. Edit: Here's the contents of that jsFiddle, in case that ever explodes and somebody is stuck with a similar issue. <style> html, body, #red, #green, #blue { height: 100%} #container { height: 300%} #red, #green, #blue { position: fixed; top: 0;