linear-gradients

Get quantitative value for color on two-color scale

怎甘沉沦 提交于 2019-12-13 08:06:10
问题 I have run a chemical test that produces a color depending on how much of a given chemical is in the sample. It is green if there is no chemical, and yellow if there is a saturating amount of chemical. I have used my camera to take pictures of several samples, and also developed a standard curve, where I add known amounts of chemical to the test, and take pictures of the results to compare the color of the result of my sample to these standards. What I would like to do, is develop an

How to draw cross background via css which is responsive

拜拜、爱过 提交于 2019-12-13 03:00:20
问题 How to draw such an shape via css in a single section(div)? currently i have used two div check my code The idea is simple, from horizantally middle the black color first need to go down at 45 degree till next 100px and then it should go at 180 degree for remaining part. All this needs to be done for a single container/section/div. .grad { height:100px; width:100%; background:linear-gradient(45deg, white 50%, black 0), linear-gradient(blue 20%, black 0); } .grad1 { height:100px; width:100%;

How to apply equivalent of linear-gradient with opacity on edges of non-repeated image

杀马特。学长 韩版系。学妹 提交于 2019-12-12 19:59:24
问题 Like How to do equivalent of a linear-gradient with opacity on a seamless background image in CSS, but instead of a seamless background image , just a regular old image. How to do the same thing? Right now when I try it on a non-repeated background image the whole image is covered in the gradient. div { width: 1000px; height: 1000px; background: linear-gradient(to bottom, #fff, transparent) top/5% 32px no-repeat, linear-gradient(to top, #fff, transparent) bottom/5% 32px no-repeat, url(https:/

CSS Linear-gradient formatting issue accross different browsers

北战南征 提交于 2019-12-12 17:28:13
问题 I've been tasked with applying a theme to a website and the theme I have been given has some strange syntax in the css file that I haven't encountered before. The theme is working fine on Firefox and Chrome but on IE is where I have experienced problems. In particularly with a div bar that lies horizontally accross the web page becoming almost transparent with some objects seen through it. This doesn't happen on Firefox or IE though. When I investigated the page source I found the div had the

Round-off error with SVG linear gradient in Chrome?

泄露秘密 提交于 2019-12-12 12:08:13
问题 I'm seeing some issues recently with Chrome to render SVG linear gradient. Have a look at this SVG below: <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <body> <svg> <g> <linearGradient id="linearGradient" gradientUnits="userSpaceOnUse" x1="79px" x2="706px" y1="0" y2="0"> <stop class="" offset="54.54545454545455%" style="stop-color: red;"></stop> <stop class="" offset="63.63636363636364%" style="stop-color: red;"></stop> <stop class="" offset="63.63636363636364%" style=

Table tr background gradient on hover using CSS

拥有回忆 提交于 2019-12-12 10:46:50
问题 My requirement: On tr hover, tr will have the linear gradient background, not only a flat background color . Sample td in tr : A | B | C | B | A Where A darker --> C lighter JSFIDDLE: https://jsfiddle.net/g7o84j43/ Code I've tried: HTML: <table border="1px" width="100%" cellpadding="0px" cellspacing="0px"> <tr style="text-align:center"> <td>A</td> <td>B</td> <td>C</td> <td>B</td> <td>A</td> </tr> <tr style="text-align:center"> <td>A</td> <td>B</td> <td>C</td> <td>B</td> <td>A</td> </tr> <

CSS 3 Gradient n pixels from bottom - Webkit/Safari

家住魔仙堡 提交于 2019-12-12 10:43:37
问题 Is there a way to creat a gradient with a stop n pixels from the bottom edge of the element? For example with Moz/Firefox it would look like: -moz-linear-gradient(center bottom , #f00 2%, #d00 31px) It should also be noted that this gradient has a companion gradient to do the same thing to the very top of the box. So really the css looks like this for FF and i need to reproduce for webkit: background-image: -moz-linear-gradient(center top , rgba(255,0,0,0.75) 2%, rgba(255,0,0,0) 31px), -moz

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

冷暖自知 提交于 2019-12-12 10:09:49
问题 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();

How to create gradient color in svg background

一笑奈何 提交于 2019-12-12 04:19:37
问题 I need to create the background color in given svg circle as like an below image.. how to acheive this background color using gradient? Note: just background color for that pic no need for needle, tick and label. Sample Link: http://jsfiddle.net/mkn9t627/4/ <svg height="500" width="500"> <circle cx="150" cy="150" r="100" stroke="black" stroke-width="3" fill="transparent" /> </svg> 回答1: Fiddle: https://jsfiddle.net/oLsLdqas/1/ <svg height="250" width="500"> <defs> <radialGradient id="grad1" cx

CSS3 Gradient for multiple browsers

青春壹個敷衍的年華 提交于 2019-12-12 02:39:46
问题 I have this CSS linear gradient working in Firefox and can't seem to get the same result to work in Safari and other browsers. its a paper like background for a contact field. I Have tried the whole body and a specific element and the style seems to only work in Firefox. Tried using the -webkit- and the -moz- but no luck. Any ideas? textarea { background-color: #fff; background-image: linear-gradient(90deg, transparent 79px, #abced4 79px, #abced4 81px, transparent 81px), linear-gradient(#eee