gradient

CSS3 Transparency + Gradient

扶醉桌前 提交于 2019-11-26 00:45:47
问题 RGBA is extremely fun, and so is -webkit-gradient , -moz-gradient , and uh... progid:DXImageTransform.Microsoft.gradient ... yeah. :) Is there a way to combine the two, RGBA and gradients, so that there\'s gradient of alpha transparency using the current/latest CSS specs. 回答1: Yes. You can use rgba in both webkit and moz gradient declarations: /* webkit example */ background-image: -webkit-gradient( linear, left top, left bottom, from(rgba(50,50,50,0.8)), to(rgba(80,80,80,0.2)), color-stop(.5

Gradients on UIView and UILabels On iPhone [duplicate]

寵の児 提交于 2019-11-25 23:47:58
问题 Possible Duplicate: Manually drawing a gradient in iPhone apps? My application needs to display text in either a UIView or UILabel but the back ground must be a gradient as opposed to a true UIColor . Using a graphics program to create desired look is no good as the text may vary depending on data returned from a server. Does anyone know the quickest way to tackle this? Your thoughts are greatly appreciated. 回答1: You could also use a graphic image one pixel wide as the gradient, and set the

Gradient borders

时光总嘲笑我的痴心妄想 提交于 2019-11-25 23:07:41
问题 I\'m trying to apply a gradient to a border, I thought it was as simple as doing this: border-color: -moz-linear-gradient(top, #555555, #111111); But this does not work. Does anyone know what is the correct way to do border gradients? 回答1: WebKit now (and Chrome 12 at least) supports gradients as border image: -webkit-border-image: -webkit-gradient(linear, left top, left bottom, from(#00abeb), to(#fff), color-stop(0.5, #fff), color-stop(0.5, #66cc00)) 21 30 30 21 repeat repeat; Prooflink --

How do I combine a background-image and CSS3 gradient on the same element?

筅森魡賤 提交于 2019-11-25 21:54:08
问题 How do I use CSS3 gradients for my background-color and then apply a background-image to apply some sort of light transparent texture? 回答1: Multiple backgrounds! body { background: #eb01a5; background-image: url("IMAGE_URL"); /* fallback */ background-image: url("IMAGE_URL"), linear-gradient(#eb01a5, #d13531); /* W3C */ } These 2 lines are the fallback for any browser that doesn't do gradients. See notes for stacking images only IE < 9 below. Line 1 sets a flat background color. Line 2 sets