opacity

CSS3: opacity vs filter opacity?

被刻印的时光 ゝ 提交于 2019-12-07 13:04:36
问题 I was playing with the CSS3 filter functions (blur, contrast, invert, etc.), and noticed there is an opacity function: filter: opacity(0.5); -webkit-filter: opacity(0.5); -moz-filter: opacity(0.5); While we already have: opacity: 0.5; If we apply both of them for a HTML element, it seems like it's getting double effect! Now that makes me wonder, is there any difference? EDIT: I'm not asking about the old IE filter: alpha(opacity=50) as that is Microsoft's implementation. I'm asking about the

Correcting IE Cleartype/Filter Problem when Animating Opacity of Text with jQuery

99封情书 提交于 2019-12-07 12:20:54
问题 Hey all, I'm having an issue with IE that seems like a fairly known/common bug. I have an image slide show I've built out in jQuery that works flawlessly in other browsers. However, in IE I've run into a problem with the text being anti-aliased once the slide show runs one time. Which is to say, if there are three images in the slide show, then the first time each of those three images appear with their text, the text renders properly. However, once the slide show cycles through the text

Animate opacity on hover (jQuery)

守給你的承諾、 提交于 2019-12-06 20:52:21
问题 We have a link: <a href="#"> Some text <span style="width: 50px; height: 50px; background: url(image.png); overflow: hidden; opacity: 0;"></span> </a> And we want to change opacity of <span> with some animation, when the link is hovered. How would we do it? 回答1: Like this: $('a:has(span)').hover( function() { $('span', this).fadeIn(); }, function() { $('span', this).fadeOut(); } ); 回答2: Another possible solution: $("a span").hover(function(){ $(this).stop().animate({"opacity": 1}); },function

Make jquery function run on page load

巧了我就是萌 提交于 2019-12-06 17:16:47
问题 I have a jquery function to change the opacity of an image on mouse hover to produce a pulsating effect, but I would like to change it so that the image pulsates as soon as the page loads, removing the mouse hover elements mouse over and mouse out. Here is the code I have (function($) { $(document).ready(function() { window.pulse_image = null; window.pulse_continue_loop = false; $('.pulse_image').mouseover(function() { // User is hovering over the image. window.pulse_continue_loop = true;

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

你离开我真会死。 提交于 2019-12-06 10:13:20
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(); divs.css({ 'opacity' : (1 - st/20) }); }); JS Fiddle so far: http://jsfiddle.net/x5JKC/ I changed a bit

Surplus in ie7 and ie8 intead of being Transparent while using PNG transparent and opacity

只愿长相守 提交于 2019-12-06 09:35:03
问题 I am developing a project that uses the PNG transparent and Opacity but, the area has a surplus in IE7 and IE8 instead of being transparent, it is black, can someone help me? print of area Thanks 回答1: I have a solution for this, have used on multiple sites before. Simply run this function after your html content has been written to the page: function fixPNGs(){ if(jQuery.browser.msie && jQuery.browser.version < 9){ var i; //alert(document.images.length); for(i in document.images){ if(document

2 opposite opacity values dont produce opaque color

纵然是瞬间 提交于 2019-12-06 05:16:56
I want to produce an opaque solid color with 2 opacity values of that color. eg: 0.5 opacity black color rectangle when placed above same 0.5 opacity black color doesn't give me same result as an opaque (opacity 1) black color. I have tried this with different range of opacity values and found something like 0.5 & 0.8 produce 0.9 opacity black color, 0.4 & 0.82 and so on. These are not accurate values. What is the exact formula for calculating exactly opposite opacity values? If two elements with opacity 1-a and 1-b are stacked on top of each other, their combined opacity will be 1-a*b , so

CSS opacity change on div with time delay not user interaction

本小妞迷上赌 提交于 2019-12-06 05:00:51
I'm trying to set up an image within a div that will slowly appear (opacity from 0 to 1) over 5 seconds. I have this code: .fadeDivIn { opacity: 1; transition: opacity 5s ease-in; -moz-transition: opacity 5s ease-in; -webkit-transition: opacity 5s ease-in; -o-transition: opacity 5s ease-in; } but I can't figure out how to trigger it automatically. I've been doing transitions to other elements with CSS3 keyframes and would ideally like to apply something similar to opacity but have hit a brick wall. Can anyone help please? http://jsfiddle.net/DerekL/9PfMF/ div{ -webkit-animation: fadein 5s

How do I set the opacity of a vertex in OpenGL?

喜夏-厌秋 提交于 2019-12-06 03:59:46
问题 The following snippet draws a gray square. glColor3b(50, 50, 50); glBegin(GL_QUADS); glVertex3f(-1.0, +1.0, 0.0); // top left glVertex3f(-1.0, -1.0, 0.0); // bottom left glVertex3f(+1.0, -1.0, 0.0); // bottom right glVertex3f(+1.0, +1.0, 0.0); // top right glEnd(); In my application, behind this single square exists a colored cube. What function should I use to make square (and only this square) opaque? 回答1: In the init function, use these two lines: glEnable(GL_BLEND); glBlendFunc(GL_SRC

Opacity of Buttons/TextBoxes - VB.NET

扶醉桌前 提交于 2019-12-06 03:42:52
问题 Is it possible to set the opacity of a button or textbox? I know that you can set the opacity for a form, but I'm not so sure about a button or textbox. 回答1: There is no way to set the opacity of any control in WinForms. Only Forms have the opacity property. If you want to make any control appear semi-transparent, you'll have to implement the whole control from scratch and that will most likely involve drawing the control as an image onto its parent. Your alternative is to use WPF, which