linear-gradients

Solid gradients not really solid? Don't have crisp edges at color stops

空扰寡人 提交于 2019-12-06 16:49:56
In CSS, this seems to be the easiest way to create solid looking gradients where colors end and start abruptly at color stops. Example - background-image:linear-gradient(to bottom, gray 100px, white 0); /*Let the browser decide*/ OR background-image:linear-gradient(to bottom, gray 100px, white 100px); /*Explicitly specify.*/ What happens is that a gradient is generated but it doesn't really have crisp edges where the colors meet. My assumption was that the code would result in gray stopping at 100px and white starting right after it. But it turns out that it's still a bit blurry. I have put

linear-gradient border modify

人盡茶涼 提交于 2019-12-06 14:26:49
Hello Everyone here i wanted to change, We need to update the strikethrough to be the same diagonal - 45 degrees centered. Please find the code at below... .Product__widths__button { background: #FFFFFF; border: 1px solid #333333; color: #333333; display: block; font-size: 16px; line-height: 42px; height: 42px; text-align: center; padding-left: 20px; padding-right: 20px; } .Product__widths__button.disabled { color: #D1D1D1; background: linear-gradient(to top left, #fff 38px, #D1D1D1, #fff 40px); border-color: #D1D1D1; } <a id="width_1_1" class="Product__widths__button disabled"><span>W</span>

Split CSS circle into 3 equal parts with linear gradients - pie chart style

余生长醉 提交于 2019-12-06 13:29:32
I'm trying to create a progress indicator - and to a certain extent I've done it, but it's not what I want to end up with. Here's an image: As you can see the indicator shows 1 third, 2 thirds, then full. This is what I want to achieve except that I want the first, second and third sections to be different colors, so I would end up with 3 equal slices in 3 different colors starting at 12 o'clock. Here's the code - I've removed the centre section because it's not relevant to the question: ( the CSS is in Less syntax ) .timeline { h3 { position:relative; & > .step { background-color:@accentColor

Android: How to make a drawable with a multicolor gradient?

一个人想着一个人 提交于 2019-12-06 10:31:59
I made this: ShapeDrawable.ShaderFactory shaderFactory = new ShapeDrawable.ShaderFactory() { @Override public Shader resize(int width, int height) { LinearGradient linearGradient = new LinearGradient(0, 0, width, height, new int[]{ 0xF44336, 0xFFB74D, 0xFFE082, 0xAED581, 0x4CAF50, 0xAED581, 0xFFE082, 0xFFB74D, 0xF44336}, new float[]{ 0, 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.75f, 0.875f, 1.0f}, Shader.TileMode.REPEAT); return linearGradient; } }; PaintDrawable paint = new PaintDrawable(); paint.setShape(new RectShape()); paint.setShaderFactory(shaderFactory); But I can't see anything when I

Generating Color Gradients

倖福魔咒の 提交于 2019-12-06 05:30:24
I had an idea to programmatically generate matching color schemes however I need to be able to generate a linear gradient given a set of two colors (Hex or RGB values). Can anyone provide me the (pseudo-)code or point me in the right direction to accomplish this task? EDIT : I forgot to mention, but I also need to specify (or know) the number of steps the gradient takes from color A to color B. Okay, so you know the steps, start color and end color. Assuming you have RGB values for each color: red_diff = end_red - start_red green_diff = end_green - start_green blue_diff = end_blue - start_blue

How to give a polygon a gradient fill inside a svg?

旧巷老猫 提交于 2019-12-06 04:01:07
问题 I am using this awesome jQuery plugin - http://benpickles.github.io/peity/ Basically, it renders mini graphs and charts in svg format. Within this svg element, there is one polygon and one polyline . I need to be able to give the polygon a gradient as its fill, instead of a solid colour. Here is the raw HTML before the plugin converts it: <td class="chartSection"> <span class="chart">100, 100.67, 102.34, 109.30, 101.20, 99.20, 70.20</span> </td> Here is the chart after the conversion: <td

Gnuplot vertical gradient on boxes depending of a value?

我的未来我决定 提交于 2019-12-06 03:43:21
Is this possible in gnuplot? How more energie how harder the color, look the example. plot for [i=1:16] file u 1:($10/i):((i*2)*1048576) w boxes lc rgb variable notitle. This is what I have now, this might be a possibility? The first example was an Excel graph. Finaly i have for me the perfect, and . . i think a very nice solution. First the plot and after that the correspondenting script. The highlights are; maks = STATS_max_y min = STATS_max_x afgenomen = gebruikt-zon set palette defined (-(min) "#D30000", 0 "#00F000", .1 "#FFF900", (maks) "#FF0700") plot for [i=51:1:-1] file u 1:(($10/51)*i

How can I make the gradient stops in a CSS3 linear gradient?

泪湿孤枕 提交于 2019-12-05 22:51:23
See the gray bar in this example page: http://dss.com.bo/inicio.aspx Here is my attempt at recreating that gradient using CSS3 - also using CSS3PIE : #navigation { border: 1px solid #888888; border-radius: 22px; -moz-border-radius: 22px; -webkit-border-radius: 22px; height: 50px; font-family: Arial; background: #AAAAAA; background: -webkit-gradient(linear, 0 0, 0 bottom, from(#AAAAAA), to(#757575)); background: -webkit-linear-gradient(#AAAAAA, #757575); background: -moz-linear-gradient(#AAAAAA, #757575); background: -ms-linear-gradient(#AAAAAA, #757575); background: -o-linear-gradient(#AAAAAA,

How to use css linear gradients in IE10?

断了今生、忘了曾经 提交于 2019-12-05 21:29:23
In IE10, I am trying to create a css linear gradient, from the top of the page to the bottom of the page. This is what I have so far <!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Test</title> </head> <body> <meta http-equiv="X-UA-Compatible" content="IE=10"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type='text/javascript' src='./includes/js/jquery-2.0.0.min.js'></script> <link rel='stylesheet' type='text/css' href='./includes/css/css.css'/> <p id="title"> Test </p> </body> </html> css body { margin: 0px; padding: 0px; background

How to use both text-shadow and linear-gradient for text?

本秂侑毒 提交于 2019-12-05 20:46:48
I try to use them both but it fails.. h1 { font-size: 72px; background: linear-gradient(to top, black 50%, orange 50%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; } <h1>Heading 1</h1> Using only linear-gradient without text-shadow: Using only text-shadow without linear-gradient: Using both: Based on this previous answer here is an idea where you will need to duplicate the text: h1 { font-family:sans-serif; font-size:60px; font-weight: bold; position:relative; margin:20px; } h1::before, h1::after {