opacity

How to make Qt widgets fade in or fade out?

流过昼夜 提交于 2019-11-29 00:45:46
问题 I am trying to fade in and fade out a QLabel or for that matter any QWidget subclass. I have tried with QGraphicsEffect , but unfortunately it works well only on Windows and not on Mac. The only other solution which can work on both Mac & Windows seems to be having my own custom paintEvent where I set the opacity of QPainter and also define a Q_PROPERTY for "opacity" in my derived QLabel and change the opacity through QPropertyAnimation . I am pasting below the relevant code snippet for your

Change Background opacity without changing content opacity

心已入冬 提交于 2019-11-28 23:10:14
I wanted to know how can I change the opacity of the background of the WPF Window without effecting the inner child controls. When I change the Window property 'Opacity' to 0.5 I do get a semi-transparent window, but the image inside the window also inherited the 0.5 opacity value, so how can I just make the opacity for the window only? The window is the parent container of everything so setting the opacity on the window will effect everything that it contains. I think what you want to do is change the Opacity of the Window.Background . Enabling a window to do transparency involves a couple

Text shadow opacity

两盒软妹~` 提交于 2019-11-28 22:32:33
Is it possible to adjust the opacity of just the text shadow, rather than the text itself as well? E.g I have purple text with a blue shadow. I'd like to make the blue shadow have an opacity without losing anything on the purple. h1.blue {text-shadow: 3px 3px 0px #3f6ba9;} Yes, but specify color in rgba mode to add alpha transparency. h1.blue {text-shadow: 3px 3px 0px rgba(63,107,169, 0.5)} //half of transparency 来源: https://stackoverflow.com/questions/11549757/text-shadow-opacity

How to keep text opacity 100 when its parent container is having opacity of 50

柔情痞子 提交于 2019-11-28 20:18:06
I have a list div which have a opacity set to 50 and inside this div I want to display some text with opacity 100, Here's what I mean: <div id="outer"> <div id="inner"> Text </div> </div> The CSS would be: #outer { opacity: 0.5; } #inner { opacity: 1.0; } I tried that, but it doesn't work. please help Regards thirtydot A simple and compatible solution is to remove all your opacity , and use: #outer { background: url(50%-transparent-white.png); background: rgba(255,255,255,0.5) } Browsers that support rgba will use the second background declaration with rgba . Browsers that do not will ignore

CSS Opacity inheritance issue [duplicate]

南楼画角 提交于 2019-11-28 13:57:33
Possible Duplicate: CSS Opacity Property I'm making a layer on an image which has a transparency and I got a problem there. When I wrote down any texts on the layer, they also get the same transparency. I thought it's because of the inheritance problem and added 'position:relative' to reset my child div, though, it didn't work at all. I just want to reset the opacity of the child div(#TXT below). Here's my code. <!DOCTYPE html> <html> <header> <meta charset="UTF-8"> <style type="text/css"> *{margin: 0; padding:0; background-color: #555;} #wrapper { margin:0 auto; background-color: white; width

jQuery fadeIn IE Png Issue when loading from external

♀尐吖头ヾ 提交于 2019-11-28 11:49:32
I am loading data from external html files within my domain into a div on my webpage using a load content method in jQuery. I take the div out of the new page whilst hiding the div in the current page by fading this out and fading the new one in. There is a png image in both of these divs and it is creating horrid black blobs in IE, works fine in other browsers but due to IEs inability to process multiple filters its making a mess. I tried using the unit png fix to no avail, does anyone have any fixes or ideas to help keep my pngs looking nice during this transition? i46.tinypic.com/t9dtvr.jpg

How do I get the opacity of an element using Javascript?

北战南征 提交于 2019-11-28 11:09:23
If I have: #em { opacity:0.5; } How do I get #em 's opacity using javascript ? :D I've got troubles with the following (it returns nothing): return document.getElementById("em").style.opacity; Graham Setting a CSS value in a stylesheet is not the same as setting it through the style property. You need to look at the getComputedStyle method to obtain this (and also currentStyle for older IE). var em = document.getElementById("em"); var temp = window.getComputedStyle(em).getPropertyValue("opacity"); Now, the variable temp will have the value of opacity of "em". document.getElementById("em")

Change background image opacity

别说谁变了你拦得住时间么 提交于 2019-11-28 10:43:39
I have a div element with text blocks and a parent div in which I have set a background image. Now I want to reduce the opacity of the background image. Please suggest how I can do that. Thanks in advance. EDIT: I am looking to change the way my blog post looks at blogger.com by editing the html content. The html code looks as follows: <div> //my blog post </div> I tried to surround the whole code above with a div element and set opacity of each div separately as below: <div style="background-image:url("image.jpg"); opacity:0.5;"> <div style="opacity:1;"> //my blog post </div> </div> But it is

Why can't child elements override the opacity of parent with a greater value?

余生长醉 提交于 2019-11-28 10:40:09
As we know, child elements cannot as of now override the opacity property of its parent. The opacity property of the parent always takes effect. This makes sense when the child is trying to underride (override with smaller value) the opacity of the parent. But what about if the child is trying to override it with a greater value? Shouldn't that be allowed? Why can't a translucent parent have an opaque child? Can anyone share thoughts on why such a restriction was decided as part of the CSS design? Would really appreciate if someone can shed some light on the theoretical reason for this. I'm

Fading issues in Internet Explorer 7 when using jQuery

左心房为你撑大大i 提交于 2019-11-28 10:11:48
问题 I'm using jQuery on a site that I'm working on and everything works fine - except in Internet Explorer 7 (and previous versions, but the site doesn't support them). Take a look at http://dev.staffanestberg.com/fromsweden/ either in Safari or Firefox, then in IE7 and you'll see what I mean. I'm currently using the built-in effect FadeTo for fading the content, but I've also tried creating custom effects as well as using both Show/Hide, Animate and FadeUp/FadeDown. I'm also using SWFaddress on