opacity

Change Background opacity without changing content opacity

被刻印的时光 ゝ 提交于 2019-12-29 04:34:05
问题 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? 回答1: 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

MouseHover and MouseLeave Events controlling

牧云@^-^@ 提交于 2019-12-29 01:42:33
问题 I was building a simple form with one simple effect- opacity reduced when mouse is not over the form, and form becomes opaque when mouse is over it. I am currently encountering couple of difficulties:- Firstly, I did this- this.MouseHover += new EventHandler(Form1_MouseHover); this.MouseLeave += new EventHandler(Form1_MouseLeave); But I had 1 richtextbox in form too, and as mouse went over it, the form lost opacity again. I had to add this too:- richTextBox1.MouseHover+=new EventHandler(Form1

Background images: how to fill whole div if image is small and vice versa

不问归期 提交于 2019-12-28 04:58:29
问题 I have three problems: When I tried to use a background image in a smaller size div, the div shows only part of image. How can I show the full or a specific part of image? I have a smaller image and I want to use in a bigger div. But don't want to use repeat function. Is there any way in CSS to manipulate the opacity of an image? 回答1: Resize the image to fit the div size. With CSS3 you can do this: /* with CSS 3 */ #yourdiv { background: url('bgimage.jpg') no-repeat; background-size: 100%; }

transparency and text problem

六月ゝ 毕业季﹏ 提交于 2019-12-28 04:35:08
问题 I'm playing with the opacity CSS attribute. It works nicely for the box (with at 50% or black at 30%) - the problem is that the text inside the box is also transparent. I would like the text to be 100% white in a box with at 30% transparency. The solution is to use CSS with tweaks or to use a .png for the background and to forget the opacity setting. Tell me, how to do 30% opacity with 100% opacity text inside. Thanks in advance 回答1: Your choices are: Using CSS3: background: rgba(255, 255,

Set opacity of background image without affecting child elements

試著忘記壹切 提交于 2019-12-27 08:18:29
问题 Is it possible to set the opacity of a background image without affecting the opacity of child elements? Example All links in the footer need a custom bullet (background image) and the opacity of the custom bullet should be 50%. HTML <div id="footer"> <ul> <li><a href="#">Link 1</a></li> <li><a href="#">Link 2</a></li> <li><a href="#">Link 3</a></li> <li><a href="#">Link 4</a></li> <li><a href="#">Link 5</a></li> </ul> </div> CSS #footer ul li { background: url(/images/arrow.png) no-repeat 0

Setting the opacity of drawing canvas in android

◇◆丶佛笑我妖孽 提交于 2019-12-25 01:55:58
问题 I am working on a function that drawing some transparent line on the canvas, the problem is , there is some "ball shape" on the line as the screenshot show. Here is my code: canvas = new Canvas(alteredBitmap); paint = new Paint(); paint.setAntiAlias(true); paint.setStrokeWidth(width); paint.setColor(color); paint.setStyle(Paint.Style.STROKE); paint.setStrokeJoin(Paint.Join.ROUND); paint.setStrokeCap(Paint.Cap.ROUND); paint.setAlpha(alpha); matrix_draw = new Matrix(); canvas.drawBitmap(bmp,

opacity of element

百般思念 提交于 2019-12-24 22:47:52
问题 I'm trying to set opacity of element by jQuery. $('[class*="OtherFeatur"]').load(function(){ $(this).fadeTo(500, 0.5); }); is not working but when I do $('[class*="OtherFeatur"]').fadeTo(0,0.5); it will be affected. where is problem of first code? and which one is better ,set opacity by jQuery or CSS? how can I do it by css ,that all browser can show it? 回答1: .load() - Load data from the server and place the returned HTML into the matched element. So this function works for loading data from

IE opacity :hover sometimes?

两盒软妹~` 提交于 2019-12-24 20:24:11
问题 I am having a very odd opacity/hover problem in IE. Everything works in FF and Chrome. Consider this page: <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#outer").css("opacity", .7); }); </script> <style type="text/css"> #outer { position: absolute; width:600px; background: #111; z-index:2; overflow: hidden; } #outer div {

Webkit issue with css3 opacity transition?

允我心安 提交于 2019-12-24 17:04:57
问题 I came across this example of modifying the Bootstrap 3 carousel to achieve a fade instead of a 'slide'. In webkit, however, the transition in the example is not smooth - it sort of flashes between items. http://codepen.io/Rowno/pen/Afykb Weirder still, when I use this code in my markup, the item transitions smoothly but other elements on the page sort of jiggle by a pixel or so at the start of each transition. Is there some sort of Webkit incompatibility with opacity transitions? 回答1: There

Webkit issue with css3 opacity transition?

廉价感情. 提交于 2019-12-24 17:03:07
问题 I came across this example of modifying the Bootstrap 3 carousel to achieve a fade instead of a 'slide'. In webkit, however, the transition in the example is not smooth - it sort of flashes between items. http://codepen.io/Rowno/pen/Afykb Weirder still, when I use this code in my markup, the item transitions smoothly but other elements on the page sort of jiggle by a pixel or so at the start of each transition. Is there some sort of Webkit incompatibility with opacity transitions? 回答1: There