linear-gradients

Is it possible to use gradients in emails?

♀尐吖头ヾ 提交于 2019-11-28 10:13:52
Is it possible to use gradients on elements in newsletter emails, using CSS? Is the full property supported? In short, no. Email clients very rarely support HTML5 or CSS3, and so it will break in any clients that don't. You could always have a fallback, but the load time won't change too much, and adding CSS3 simply adds more code to keep track of. I would recommend using image tags and hosting the images on your server, and that's if you really have to use gradients at all. With email, generally the simpler the better. Personally, I prefer recieving plain text. FWIW, here's my go-to resource

2d color gradient plot in R

こ雲淡風輕ζ 提交于 2019-11-28 09:17:33
I want to produce a 2d color gradient rectangle like the ones in the picture below on the right hand side. How can I do this in R? Using colorRamp or RColorBrewer or other functions/packages I can produce nice 1D dolor ramps. But how do I do this for 2D including several colors in the corners, like e.g. the upper right rectangle? What I want to get is e.g. the following two gradient types: BTY: I completely forgot to mention that I found the above chart here (produced by Luca Fenu). Luca Fenu Thanks for commenting on my post - I'm glad it generated some discussion. Here's a minimal code to

Blurry linear gradient stops in chrome

℡╲_俬逩灬. 提交于 2019-11-28 09:11:05
If I am using a linear gradient with multiple stops like this: div { border: 1px solid black; width: 100px; height: 2000px; display: inline-block; background-image: linear-gradient(to bottom, #383937 0, #001500 35px, #ffffff 35px, #b0b0b0 150px, #ffffff 150px, #ffffff 100%); } Firefox Problem free. Chrome The transitions between gradient colors are blurry. I am reusing a position to define a new color, so on position 35, the color goes from #001500 to #ffffff instantly (or at least should). The blurryness between gradient stops increases if the div is taller. IE There is some blurryness like

White line appears at end of gradient filled div at specific browser widths

天涯浪子 提交于 2019-11-28 08:40:37
问题 I have a div with id #gradient_div with a background-image set to linear-gradient . I'm getting a gap between the end of the linear-gradient and the end of the div #gradient_div only at certain browser window widths. As I stretch and shrink the browser window this white line disappears and reappears. It seems like it has something to do with the margin: When I have the margin set to margin: 0 1%; , the while line appears at specific window widths. At 1% the white line appears whenever the

How can I prevent CSS gradient banding?

孤者浪人 提交于 2019-11-28 08:02:06
I started using CSS gradients, rather than actual images, for two reasons: first, the CSS gradient definitely loads faster than an image, and second, they aren't supposed to show banding, like so many raster graphics. I started testing my site on various screens recently, and on larger ones (24+ inches), the CSS linear gradient which constitutes my site's background shows very visible banding. As a provisional fix, I've overlaid the gradient with a small, repeating, transparent PNG image of noise, which helps a little. Is there any other way to fix this banding issue? I know you won't like the

Cross browser text gradient in pure css without using background image [closed]

强颜欢笑 提交于 2019-11-28 06:50:46
I have tried a lot for text gradient. I have found the code for safari and chrome but it is not compatible in other browsers. I want to make it work without using the background image. If u have any proper solution, kindly provide. Harry12345 I found the best way to do this is to use SVG gradients, it's easy to do and doesn't require any images, below is some code that creates a simple text gradient using SVG. <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> <defs> <linearGradient id="grad1" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" style="stop-color:#FF6600;stop-opacity:1" />

SVG gradient using CSS

断了今生、忘了曾经 提交于 2019-11-28 03:53:15
I'm trying to get a gradient applied to an SVG rect element. Currently, I'm using the fill attribute. In my CSS file: rect { cursor: pointer; shape-rendering: crispEdges; fill: #a71a2e; } And the rect element has the correct fill color when viewed in the browser. However, I'd like to know if I can apply a linear gradient to this element? Thomas W Just use in the CSS whatever you would use in a fill attribute. Of course, this requires that you have defined the linear gradient somewhere in your SVG. Here is a complete example: rect { cursor: pointer; shape-rendering: crispEdges; fill: url(

Unable to select <linearGradient> with D3.js in Chrome

喜夏-厌秋 提交于 2019-11-28 02:07:16
Chrome doesn't select <linearGradient> with D3.js. In the following code all selections are empty. var defs = d3.select("body").append("svg").append("defs"); defs.append("linearGradient"); defs.append("linearGradient"); console.log(defs.selectAll("linearGradient")); // empty console.log(defs.selectAll("lineargradient")); // empty console.log(d3.selectAll("linearGradient")); // empty If you replace <linearGradient> with say <mask> it's all right. var defs = d3.select("body").append("svg").append("defs"); defs.append("mask"); defs.append("mask"); console.log(defs.selectAll("mask")); // 2

iOS Find Color at Point Between Two Colors

喜你入骨 提交于 2019-11-27 19:55:02
I have a problem: I need to be able to take two colors and make a 'virtual gradient' out of them. I then need to be able to find the color at any point on this line. My current approach is this: if (fahrenheit < kBottomThreshold) { return [UIColor colorWithRed:kBottomR/255.0f green:kBottomG/255.0f blue:kBottomB/255.0f alpha:1]; } if (fahrenheit > kTopThreshold) { return [UIColor colorWithRed:kTopR/255.0f green:kTopG/255.0f blue:kTopB/255.0f alpha:1]; } double rDiff = kTopR - kBottomR; double gDiff = kTopG - kBottomG; double bDiff = kTopB - kBottomB; double tempDiff = kTopThreshold -

css gradient for triangle shaped arrow

那年仲夏 提交于 2019-11-27 19:54:37
Please take a look at http://jsfiddle.net/ghAgQ/ I need the same gradient for arrow, as it is for the rectangle. Any ideas how thats done? Thanks .rectangle { background-color: #EEE; height: 80px; width: 240px; border: 1px solid #CCC; background: white; cursor: pointer; background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,white), color-stop(37%,#F1F1F1), color-stop(57%,#E1E1E1), color-stop(100%,#F6F6F6)); float: left; } .arrow { border-top: 41px solid transparent; border-bottom: 41px solid transparent; border-left: 15px solid #C4C4C4; float: left; cursor: pointer; } ​ Ana