简体   繁体   English

CSS径向渐变

[英]CSS Radial gradient

I have encountered a few problems with CSS radial gradients. 我在CSS径向渐变中遇到了一些问题。

My very simple prototype can be seen here http://payment.hvan.lt/pt/ . 我的非常简单的原型可以在http://payment.hvan.lt/pt/中找到 In Chrome/Safari/Firefox background gradient is shown correctly, however, as page does not have content to fill the whole screen, background just stops and a half of the screen is white. 在Chrome / Safari / Firefox中,背景渐变正确显示,但是,由于页面没有内容填满整个屏幕,背景只会停止,并且一半的屏幕为白色。 If I use repeat, then the circle repeats too and I get what I don't want to. 如果我使用重复,那么圆圈也会重复,我得到了我不想要的东西。

In Opera the gradient background is not shown at all. 在Opera中,完全不显示渐变背景。

What I want to do is that we could see that white circle at the middle top of the screen that would turn to #e6e6e6 background to every direction and would fill all the page, no matter how much content there is. 我想做的是,我们可以在屏幕中间看到一个白色的圆圈,该圆圈将变成每个方向的#e6e6e6背景,并将填充所有页面,无论内容多少。

Set height of body and html tags to 100% and the body background will fill the whole page. 将body和html标签的高度设置为100%,正文背景将填满整个页面。 (works in Chrome, haven't tried another browsers) (可在Chrome浏览器中使用,尚未尝试使用其他浏览器)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM