opacity

Possible Opacity Z-Index Bug

ぃ、小莉子 提交于 2019-12-23 13:53:41
问题 I just ran into a really wierd issue when setting opacity on a web page. The element with opacity obscures other elements on the page.This happens in Safari, Chrome and Firefox. Opacity is ignored in IE7 & 8. Not tested on IE9. Fiddle <style> #content { opacity: .92; background: #dfd; height: 300px;} #sidebar { width: 200px; float: right; background: #fdd; height: 200px; } </style> <div id="sidebar"></div> <div id="content"></div> Removing opacity restores the expected behavior. Another

WPF XAML Changing Image opacity on IsEnabled state

家住魔仙堡 提交于 2019-12-23 13:25:09
问题 I would like to have the image to have an opacity of .50 when the IsEnabled is false. I have been looking at multiple examples but still I am not able to grasp how to make it work. Here is the full XAML of my custom control. Any help would be deeply appreciated. <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats

jQuery applying css opacity

[亡魂溺海] 提交于 2019-12-23 11:52:03
问题 I have tried to get the opacity to work in IE, I am testing in IE8 at the moment, Chrome etc works fine but IE8 is terrible. My code has been: $('#mydiv').animate({'opacity': '0.5'}); and $('#mydiv').css('opacity', 0.5); The opacity is applied to the images held within this div but none of the text, it's very infuriating :( can anyone help me? Thanks in advance. 回答1: try with this: -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=75)"; /* IE 8 */ filter: alpha(opacity=75); /* older

What is the difference between “opacity” and “filter: opacity()”

流过昼夜 提交于 2019-12-23 06:48:27
问题 Most of us know the simple opacity CSS rule, but recently I stumbled upon filter which can have opacity(amount) as it value - among other things. But what exactly is the difference between the two? 回答1: filter in CSS had some different runs, namely for FireFox and MSIE. In MSIE 5.5 on through 7, filter, also known as Alpha Filter, actually makes use of MSIE's DX Filter (no longer supported). However, in order to be more CSS2.1 compliant, in IE8 MS introduced -ms-filter to replace filter. The

How to change the background colour's opacity in CSS [duplicate]

好久不见. 提交于 2019-12-23 06:48:24
问题 This question already has answers here : How do I give text or an image a transparent background using CSS? (28 answers) Closed 3 years ago . I have a PNG file which I give a background colour to its transparent areas, but I would like to make the background colour a bit transparent, like opacity. Here is my code so far: social img{ opacity:0.5; } .social img:hover { opacity:1; background-color:black; } 回答1: background: rgba(0,0,0,.5); you can use rgba for opacity, will only work in ie9+ and

C# 2 forms and opacity question

风格不统一 提交于 2019-12-23 05:43:06
问题 I have 2 forms. on the second form i have a track bar. Whenever that track bar changes it's value, I want form 1 to become transparent. My code. opacitytrackBar1.ValueChanged += new EventHandler(opacitytrackBar1_ValueChanged); but what is the code for setting form1's opacity? thanks! 回答1: Are you after the .Opacity property on the form object? http://msdn.microsoft.com/en-us/library/system.windows.forms.form.opacity(v=VS.80).aspx 回答2: Check this sites: Fading Windows Form in C# Transparency

Reduce opacity of image using Opencv in Python

Deadly 提交于 2019-12-23 01:32:09
问题 In the program given below I am adding alpha channel to a 3 channel image to control its opacity. But no matter what value of alpha channel I give there is no effect on image! Anyone could explain me why? import numpy as np import cv2 image = cv2.imread('image.jpg') print image b_channel,g_channel,r_channel = cv2.split(image) a_channel = np.ones(b_channel.shape, dtype=b_channel.dtype)*10 image = cv2.merge((b_channel,g_channel,r_channel,a_channel)) print image cv2.imshow('img',image) cv2

Reduce opacity of image using Opencv in Python

痞子三分冷 提交于 2019-12-23 01:31:49
问题 In the program given below I am adding alpha channel to a 3 channel image to control its opacity. But no matter what value of alpha channel I give there is no effect on image! Anyone could explain me why? import numpy as np import cv2 image = cv2.imread('image.jpg') print image b_channel,g_channel,r_channel = cv2.split(image) a_channel = np.ones(b_channel.shape, dtype=b_channel.dtype)*10 image = cv2.merge((b_channel,g_channel,r_channel,a_channel)) print image cv2.imshow('img',image) cv2

How can i allow opacity to a div and not the background image?

旧城冷巷雨未停 提交于 2019-12-22 08:24:33
问题 How can i allow opacity to a div and not the background image? On an ajax request, the following class is applied to a selected div. All contents of that div become opaque. However, the background ajax loading indicator also becomes opaque. How can i make it that the background image does not become opaque? .ajax-mask { opacity: 0.5; filter: alpha(opacity=50); background: url('/Images/Ajax/Ajax.gif') no-repeat center center; } (sorry, dont know why there are two opacity styles. Not a style

How do I set an Android View's transparency with animation?

萝らか妹 提交于 2019-12-21 09:25:37
问题 I need to set the initial transparency for a TextView , but I don't know how to do it. On iPhone/iOS, it can be done easily with the alpha property. On Android, I've tried to set the alpha using AlphaAnimation but it's no good -- it doesn't work. It just returns to 100% alpha when the animation ends. AlphaAnimation anim = new AlphaAnimation(1, 0.2f); anim.setDuration(5000); textView.startAnimation(anim); Any ideas guys? 回答1: You can set the alpha channel directly in a color value that you