gradient

Creating gradient lines in CSS

时间秒杀一切 提交于 2019-12-01 20:43:33
Question, if I wanted to create gradient lines that fade out on the top and bottom, similar to the lines seen on AT&T's drop down menu that separate the menu items, how would I go about that? I want to create a similar effect on a menu that I am coding, and I would prefer not to use images. Is there a way to achieve this in CSS? Help much appreciated! Thanks. Microsoft CSS Gradient is a GUI you can use. just copy the CSS into your code: Example: #div { /* IE10 Consumer Preview */ background-image: -ms-linear-gradient(bottom, #FFFFFF 0%, #00A3EF 100%); /* Mozilla Firefox */ background-image:

Gradient not working in IE 10/11

落爺英雄遲暮 提交于 2019-12-01 20:19:25
here my CSS to get the gradient working in any browser, inlcuding IE up to version 9 (IE9): .wrapper { background:-moz-linear-gradient(top , #0f1925, #000) repeat scroll 0 0 transparent; background:-o-linear-gradient(top , #0f1925, #000) repeat scroll 0 0 transparent; background:-webkit-linear-gradient(top , #0f1925, #000) repeat scroll 0 0 transparent; filter:progid:DXImageTransform.Microsoft.Gradient(startColorStr='#0f1925', endColorStr='#000', GradientType=0); } It won't work for IE 10/11 though. Any ideas? Thanks in advance Internet Explorer 10+ uses the standard syntax : background-image:

CSS Gradient Animate

混江龙づ霸主 提交于 2019-12-01 19:03:06
I'm trying to animate a CSS gradient as described here but I can't get it to work. As an example I've put together this jsfiddle. As a overview, it seems that CSS transitions on gradients doesn't seem to work. div#Machine { -webkit-transition: background 5s; -moz-transition: background 5s; -ms-transition: background 5s; -o-transition: background 5s; transition: background 5s; background: rgb(71, 234, 46); background: -moz-linear-gradient(top, rgba(71, 234, 46, 1) 0%, rgba(63, 63, 63, 1) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(71, 234, 46, 1)),

tensorflow: how come gather_nd is differentiable?

巧了我就是萌 提交于 2019-12-01 15:57:24
I'm looking at a tensorflow network implementing reinforcement-learning for the CartPole open-ai env. The network implements the likelihood ratio approach for a policy gradient agent. The thing is, that the policy loss is defined using the gather_nd op!! here, look: .... self.y = tf.nn.softmax(tf.matmul(self.W3,self.h2) + self.b3,dim=0) self.curr_reward = tf.placeholder(shape=[None],dtype=tf.float32) self.actions_array = tf.placeholder(shape=[None,2],dtype=tf.int32) self.pai_array = tf.gather_nd(self.y,self.actions_array) self.L = -tf.reduce_mean(tf.log(self.pai_array)*self.curr_reward) And

tensorflow: how come gather_nd is differentiable?

折月煮酒 提交于 2019-12-01 14:42:41
问题 I'm looking at a tensorflow network implementing reinforcement-learning for the CartPole open-ai env. The network implements the likelihood ratio approach for a policy gradient agent. The thing is, that the policy loss is defined using the gather_nd op!! here, look: .... self.y = tf.nn.softmax(tf.matmul(self.W3,self.h2) + self.b3,dim=0) self.curr_reward = tf.placeholder(shape=[None],dtype=tf.float32) self.actions_array = tf.placeholder(shape=[None,2],dtype=tf.int32) self.pai_array = tf.gather

Create gradient for color selection with HTML5 canvas (all possible RGB colors)

天涯浪子 提交于 2019-12-01 14:38:31
Is it possible to greate a linear gradient which contains all possible RGB colors (only red, green, blue - no alpha values) for a linear color picker. So far I've tried it with the following gradient, but it doesn't contain all values from rgb(0,0,0) to rgb(255,255,255) : var grd = ctx.createLinearGradient(0, 0, width, 0); grd.addColorStop(0, 'red'); grd.addColorStop(1 / 6, 'orange'); grd.addColorStop(2 / 6, 'yellow'); grd.addColorStop(3 / 6, 'green') grd.addColorStop(4 / 6, 'aqua'); grd.addColorStop(5 / 6, 'blue'); grd.addColorStop(1, 'purple'); Any help is highly appreciated. Unfortunately

gradient keeps switching between cells in collection view in swift

孤街浪徒 提交于 2019-12-01 13:17:41
问题 I have a gradient background for my collection view cell and each gradient is different depending on what tag the cell is (e.g Christmas is a purple gradient, birthday is a green gradient) however when scrolling through the collection view, the gradients keep on changing cells. is there a way to fix this from happening? this is the code I use to set the gradient to the background view. it is in cellForItemAt cell.mainView.setGradientBackground(colours: self.getColourFromTag(tag: self.lists

AS3: beginGradientFIll() doesn't make me a gradient!

杀马特。学长 韩版系。学妹 提交于 2019-12-01 11:32:58
I'm trying to render a circle with a radial gradient but I can't seem to figure it out. var bkgdGrad:Shape = new Shape(); bkgdGrad.graphics.beginGradientFill(GradientType.RADIAL, [0x0000FF, 0x00FF00], [1, 1], [0, 255],null,"pad"); bkgdGrad.graphics.drawCircle(0,0,r+200); bkgdGrad.graphics.endFill(); this.addChild(bkgdGrad); The above code renders a solid green circle for me. If I change the array after the colors to [1,0] (the alpha array) I get a transparent fill. I can't seem to get flash to draw a radial gradient, the above works no problem for GradientType.LINEAR Swati Singh Try this, it

Gradient Panel shows red cross when minimized and then restored

无人久伴 提交于 2019-12-01 11:22:00
问题 I have no idea why this is happening, but I created the below code which is a gradient panel, the panel is then docked to the left of the screen. When the form is re-sized it displays correctly, however if you minimize the form and then restore it you get a big red X instead of the gradient. Can anyone spot the error? using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Drawing2D; using System.Text; using

Canvas gradient performance

淺唱寂寞╮ 提交于 2019-12-01 09:16:28
I am currently programming a little game using canvas. For the game I need some kind of fog which hides the most part of the map and only a small area around the player should be visible. Therfor I use a second canvas to overlay the one where the game takes place and fill it with a gradient (from transparent to black): function drawFog(){ fogc.clearRect(0,0,700,600); // Create gradient var grd=fogc.createRadialGradient(player.getPosX(),player.getPosY(),0,player.getPosX(),player.getPosY(),100); grd.addColorStop(0,"rgba(50,50,50,0)"); grd.addColorStop(1,"black"); // Fill with gradient fogc