opacity

how to cancel opacity for a child element?

怎甘沉沦 提交于 2019-11-26 07:49:02
问题 I want apply opacity for parent but I do not want the child element to inherit this opacity. <div class=\"parent\"> <div class=\"child\"></div> </div> .parent { opacity: 0.6; } Is there a way to \"cancel\" the inherited opacity? maybe force it to opacity=1 for the child element? 回答1: The opacity of the child will always be the opacity of the parent if the opacity of the child is 1. This is not a problem with inheritance, but rather with the way opacity is calculated. For instance, <div id=

image moves on hover - chrome opacity issue

Deadly 提交于 2019-11-26 06:57:30
问题 There seems to be an issue with my page here: http://www.lonewulf.eu When hovering over the thumbnails the image moves a bit on the right, and it only happens on Chrome. My css: .img{ -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)\"; filter:alpha(opacity=50); -moz-opacity: 0.5; opacity: 0.5; -khtml-opacity: 0.5; display:block; border:1px solid #121212; } .img:hover{ -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)\"; filter:alpha(opacity=100); -moz-opacity

How to change text transparency in HTML/CSS?

柔情痞子 提交于 2019-11-26 06:30:58
问题 I\'m very new to HTML/CSS and I\'m trying to display some text as like 50% transparent. So far I have the HTML to display the text with full opacity <html><font color=\\\"black\\\" face=\\\"arial\\\" size=\\\"4\\\">THIS IS MY TEXT</font></html> However, I\'m not sure how to change its opacity. I\'ve tried looking online, but I\'m not sure exactly what to do with the code I find. 回答1: opacity applies to the whole element, so if you have a background, border or other effects on that element,

How to set the opacity/alpha of a UIImage?

為{幸葍}努か 提交于 2019-11-26 06:19:26
问题 I know you can do this with a UIImageView, but can it be done to a UIImage? I want to have the animation images array property of a UIImageView to be an array of the same image but with different opacities. Thoughts? 回答1: I just needed to do this, but thought Steven's solution would be slow. This should hopefully use graphics HW. Create a category on UIImage: - (UIImage *)imageByApplyingAlpha:(CGFloat) alpha { UIGraphicsBeginImageContextWithOptions(self.size, NO, 0.0f); CGContextRef ctx =

jquery IE Fadein and Fadeout Opacity

南楼画角 提交于 2019-11-26 05:53:58
问题 I am getting this weird problem in IE with a CSS Overlay I am applying for a lightbox. Basically, I use fadein and fadeout for jquery - the problem is that everything works fine EXCEPT in IE . In IE - I get no fadein - rather it just goes straight to opacity background. On fadeout - it removes the \"opacity\" for < 1 sec second and renders the page a \"solid color\" before removing the overlay. Anyone know how to fix this bug ? Its really annoying - I am using all the correct filters etc its

How to make blinking/flashing text with CSS 3

强颜欢笑 提交于 2019-11-26 05:49:23
问题 Currently, I have this code: @-webkit-keyframes blinker { from { opacity: 1.0; } to { opacity: 0.0; } } .waitingForConnection { -webkit-animation-name: blinker; -webkit-animation-iteration-count: infinite; -webkit-animation-timing-function: cubic-bezier(.5, 0, 1, 1); -webkit-animation-duration: 1.7s; } It blinks, but it only blinks in \"one direction\". I mean, it only fades out, and then it appears back with opacity: 1.0 , then again fades out, appears again, and so on... I would like it to

Opacity of div&#39;s background without affecting contained element in IE 8?

不羁岁月 提交于 2019-11-26 05:16:13
问题 I want to set Opacity of div\'s background without affecting contained element in IE 8. have a any solution and don\'t answer to set 1 X 1 .png image and set opacity of that image because I am using dynamic opacity and color admin can change that I used that but not working in IE 8 #alpha { filter: alpha(opacity=30); -moz-opacity: 0.3; -khtml-opacity: 0.3; opacity: 0.3; } and rgba(0,0,0,0.3) also. 回答1: The opacity style affects the whole element and everything within it. The correct answer to

Can you set a border opacity in CSS?

China☆狼群 提交于 2019-11-26 04:57:32
问题 Is there a straight forward CSS way to make the border of an element semi-transparent with something like this? border-opacity: 0.7; If not, does anyone have an idea how I could do so without using images? 回答1: Unfortunately the opacity element makes the whole element (including any text) semi-transparent. The best way to make the border semi-transparent is with the rgba color format. For example, this would give a red border with 50% opacity: div { border: 1px solid rgba(255, 0, 0, .5);

How to change a bitmap&#39;s opacity?

一世执手 提交于 2019-11-26 04:47:38
问题 I have a bitmap: Bitmap bitmap = BitmapFactory.decodeFile(\"some/arbitrary/path/image.jpg\"); But I\'m not going to display the image to the user. I want the alpha to be 100 (out of 255). If this is not possible, can I set the opacity of the Bitmap ? 回答1: You could also try BitmapDrawable instead of Bitmap . If this is useful for you depends on the way you use the bitmap... Edit As a commenter asked how he can store the bitmap with alpha, here is some code: // lets create a new empty bitmap

How can I set the opacity or transparency of a Panel in WinForms?

可紊 提交于 2019-11-26 04:33:32
I was wondering how to change or modify the transparency of a Panel in C#, not the whole form, but the panel only.. I've seen many C# tutorials on Opacity, but its for the Form. im looking for how it could be possible with the Panel only. Thank You! Yes, opacity can only work on top-level windows. It uses a hardware feature of the video adapter, that doesn't support child windows, like Panel. The only top-level Control derived class in Winforms is Form. Several of the 'pure' Winform controls, the ones that do their own painting instead of letting a native Windows control do the job, do however