gradient

Background Gradient - Fill Page without scroll bars or repeating

試著忘記壹切 提交于 2019-12-24 04:56:08
问题 I have a background gradient and it looks great but I have one problem, on short pages the background is too long and causes unnecessary scroll bars and on long pages the background will start to repeat instead of stretching to fill the entire page. Here is the CSS I am using: html, body{ font-size:1em; font-family: "ff-dagny-web-pro", Helvetica, Arial, sans-serif; line-height:1.438em; color:#222; margin: 0; padding: 0; text-align: justify; background: rgb(0,0,0); /* Old browsers */

How to display a smoother gradient in HTML5 canvas?

白昼怎懂夜的黑 提交于 2019-12-24 04:27:39
问题 I have a html5 canvas in my web page. I have only put an image and a gradient in it. Canvas uses thic JS code to draw itself: var canvas = document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); ctx.clearRect ( 0 , 0 , canvas.width, canvas.height ); var img = document.getElementById("slika"); ctx.drawImage(img, 0, 0,canvas.width,canvas.height); var grd = ctx.createLinearGradient(x-400, 0, x, 0) grd.addColorStop(0.3,"hsla(360, 100%, 100%, 0)"); grd.addColorStop(1,"hsla(360, 100

Why do Safari and Firefox seem to incorrectly render my gradient and how can I fix it?

孤街醉人 提交于 2019-12-24 03:47:10
问题 Here's the code on CodePen. It looks exactly as I expect in Chrome. Firefox and Safari both look wrong. (I'm on the latest versions of all 3.) I'm working on a way to use a constant gradient background across multiple inline-block elements. Here's how it's working right now: I have a parent ol whose :before pseudo-element has a gradient background ( transparent to opaque color) and a z-index set to display it above the child li s. The li s have the background-color set to the color that looks

Having gradient background of system tray context menu

守給你的承諾、 提交于 2019-12-24 01:49:05
问题 I am developing desktop application in java.On start up my application runs from system tray.But the system tray's context menu is having standard look and feel according to OS.I want to customize the context menu.I want to give gradient background to it , want to change fonts,borders etc.Let me know is this possible ? If there are some examples for that please provide links for the same.. Thanks in advance.. 回答1: hmmm only this blog by one of SwingGuru's can hepl you with that import java

How to make a diagonal css gradient without the colors blending together(a sharp color change) that's displaced 70% to the right?

泪湿孤枕 提交于 2019-12-24 01:47:17
问题 I can't find any css gradient color generators that do what i'm trying to do. A diagonal gradient with no blending, just a sharp color change from #252525 to #0099ff (for example), with the line where the two colors meet being about 70% from the left of the container, so the line would start a little more than halfway across the x axis of the container, and the line would end maybe halfway down the y axis of the right side of the container. If you would be able to emphasize what numbers are

How to gradient fill an annotation shape in ggplot2

两盒软妹~` 提交于 2019-12-24 00:59:40
问题 I have a polar plot that graphs hourly data over a year. I have managed to put in four annotation rectangles to denote season. I would like these rectangles to have a gradient fill from clear to the current colour. Here is my current graph: I have tried to put in a gradient fill for the rectangles specifically, but this conflicts with the marker scale fill gradient. Ideally the graph would look like this: Here is my code so far: #how to generate a dataset with hourly readings over a year and

Gradient as a Buttons BorderColor?

陌路散爱 提交于 2019-12-23 20:01:23
问题 I want to set a gradient border color for a Xamarin.Forms button. How can I do that? Current: Desire: A few options rise to the top through Google, but none seem to be platform independent AND work for Buttons. To name a couple: -Using a WebView and setting the gradient background using CSS (source: Xamarin forums) -XFGloss looks to be a outstandingly well-designed solution but, unfortunately its scope, as written, appears to be Cell views and Layouts only. Likewise even if this does work for

Programmatically add Gradient with solid color and stroke

前提是你 提交于 2019-12-23 19:15:07
问题 Currently I am using this code to add color: ShapeDrawable drawable = new ShapeDrawable(new OvalShape()); drawable.getPaint().setColor(color); Now I need to apply some gradient colors to it along with stroke(like border with different color). I am setting this as background to button. Here is what I am expecting, I need to do it programmatically. 回答1: Add a RadialGradient to your drawable like this: Shader shader = new RadialGradient(x, y, radius, color0, color1, Shader.TileMode.REPEAT);

Apply gradient to sphere object with JavaFX

泪湿孤枕 提交于 2019-12-23 17:00:50
问题 I'm working in JavaFX for a class, and I'm trying to apply a gradient to a sphere, but (obviously), I can't figure out how to do it. I'm stuck because I know that a sphere is an object, and so it needs to have a material, but (as far as colors go), a PhongMaterial only takes one color, and so it won't take a gradient because a gradient is a range of colors. So basically what I'm trying to is the following: Sphere sphere = new Sphere(50); RadialGradient rg = new RadialGradient(0, 0, 0, 0, 5,

Bottom Gradient Border

最后都变了- 提交于 2019-12-23 16:17:10
问题 According to CSS Tricks, the following CSS syntax would result in left border gradient. .left-to-right { border-width:3px 0 3px 3px; -webkit-border-image: -webkit-gradient(linear, 100% 0, 0 0, from(black), to(rgba(0, 0, 0, 0))) 1 100%; -webkit-border-image: -webkit-linear-gradient(right, black, rgba(0, 0, 0, 0)) 1 100%; -o-border-image: -o-linear-gradient(right, black, rgba(0, 0, 0, 0)) 1 100%; -moz-border-image: -moz-linear-gradient(right, black, rgba(0, 0, 0, 0)) 1 100%; } I'm trying to get