opacity

Change div opacity on scroll

浪尽此生 提交于 2019-12-04 05:11:42
How can I make it so that when you scroll down the page, the next DIV fades on top of the previous? I've set up this fiddle to illustrate it better: http://jsfiddle.net/meEf4/176/ So for example if you're halfway down the page, the background is blue. Edit: Here's the contents of that jsFiddle, in case that ever explodes and somebody is stuck with a similar issue. <style> html, body, #red, #green, #blue { height: 100%} #container { height: 300%} #red, #green, #blue { position: fixed; top: 0; width: 100%; } #red { background:red; z-index: 5} #blue { background:blue; z-index: 4} #green {

mix-blend-mode issues in Chrome

拥有回忆 提交于 2019-12-04 05:06:33
I've been trying to use the mix-blend-mode on a page that has contains instances of css opacity transitions. What appears to be happening is that the div containing the mix-blend-mode displays as it would without the blend mode during the transition, or rather, while the animation is in progress. I've only found it to be an issue in Chrome. In my example, while the div is transforming the blend-mode displays correctly over the image but not over the page background. Once the transition is complete it goes back to display as it should. In other words the blended div appears as solid yellow on

html contentEditable document.execCommand change selected opacity

十年热恋 提交于 2019-12-04 04:31:05
any one worked with changing opacity on contentEditable selected. I tried with following: document.execCommand('foreColor', false, 'rgba(0,0,0,0.5)'); // with rgba document.execCommand('foreColor', false, '80000000'); // with alpha hex none worked. but i can easily change colour with: document.execCommand('foreColor', false, '000000'); Can anyone help me on change opacity with document.execCommand ? Update On further searching found out: document.execCommand 'foreColor' add font tag to selected with given colour. But sadly the color attribute of is not supported in HTML5. is thats the problem

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

霸气de小男生 提交于 2019-12-04 03:22:03
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? You can set the alpha channel directly in a color value that you assign to the TextView. See Available Resource Types . 来源: https://stackoverflow.com/questions/2180677/how-do-i

jQuery slider control for opacity

纵然是瞬间 提交于 2019-12-04 03:19:56
I'm trying to implement a jQuery slider control for opacity of a certain element on my web page. Kind of like this question but with a slider. I was wondering how I should implement this best, as I'm a little lost as how I should get started... I'm guessing a function wouldn't be the best, would it? Defining a function and then calling it for the slider? The jQuery documentation for the slider control is proving to be a little too complex for me for this topic, but I'm sure some of you can help clarify how to get this thing going! Sorry the question is kind of vague, but I'm not really sure

Is it possible to set the opacity of qt widgets?

吃可爱长大的小学妹 提交于 2019-12-04 03:01:37
I know that there is a function QWidget::setWindowOpacity(qreal level) but as written in the documentation this does only work for windows. Is there a way to make widgets that are lying inside layouts opaque too? What I'm trying to do is an animation where widgets are fading in. I once did that with a preferences-dialog and there it worked. So do you think there is a way or a work-around to achieve opacity for widgets inside layouts? How would you do that? Thanks in advance! Miguel Fuentes Just use QGraphicsOpacityEffect in order to achieve this effect. Qt4: http://doc.qt.io/qt-4.8

Can a child div have a higher opacity than parent with css?

ぐ巨炮叔叔 提交于 2019-12-03 23:53:22
I have a background on a page body that is an image which I want to show through the first level of divs but not the second <body> <div style='opacity:0.9;'><p>This is a wrapper that shows some of the background</p> <div style='background-color:#fff;'><p>This is a child div that I want to be all white</p> </div> </div> </body> Obviously the second level div picks up the opacity of .9 as well is there a way to override this? Hi you can do as like this You can define parent opicity and child as like you ex. css .parent{ padding:20px; background:rgba(112,81,246,0.3); } .child{ padding:20px;

Problem with opacity in IE8

夙愿已清 提交于 2019-12-03 21:47:26
问题 I try to solve a problem that appears in IE8. Html is very simple: <div id="overlay"> </div> <div id="imgcontainer"> <div> <div id="source"> </div> </div> </div> When I set (using jQuery) opacity of "#source" element with "0" in IE I can see the background of #overlay, not #imgcontainer > div, but why? There is a javascript code: $(function(){ $("#source").css({ opacity: "0", }); $("#overlay").css({ width: $(window).width(), height: $(window).height(), display: "block", opacity: "0.6" }); $("

QML Opacity Inheritance

我的梦境 提交于 2019-12-03 19:21:09
问题 In QML, how can I prevent a child element from inheriting the opacity from its parent? I want to set different opacity values for the parent and it's child element. 回答1: Actually, setting layer.enabled: true for the parent element does the thing for me. The whole element is rendered to the buffer, and opacity is applied to the resulting buffer (to the whole layer at once). See http://doc.qt.io/qt-5/qml-qtquick-item.html#layer.enabled-prop Example code: Rectangle { width: 400 height: 200

How do I make textures transparent in OpenGL?

淺唱寂寞╮ 提交于 2019-12-03 16:37:33
I've tried to research this on Google but there doesn't appear to me to be any coherent simple answers. Is this because it's not simple, or because I'm not using the correct keywords? Nevertheless, this is the progress I've made so far. Created 8 vertices to form 2 squares. Created a texture with a 200 bit alpha value (so, about 80% transparent). Assigned the same texture to each square, which shows correctly. Noticed that when I use a texture with 255 alpha, it appears brighter. The init is something like the following: glClearColor(0.0, 0.0, 0.0, 0.0); glShadeModel(GL_FLAT); glEnable(GL