html - 纯css渐变

标签 html css yui-pure-css

有谁知道我如何使用纯 CSS 绘制如下图所示的渐变。

它不必在 IE 中工作。 我可以让它工作,但我似乎无法像图像显示的那样逐渐减少左右两侧的渐变。 任何想法将不胜感激。同样,这是使用直接的 css 来执行此操作。

Gradient example

最佳答案

这个网站非常适合做 CSS 渐变:

http://www.colorzilla.com/gradient-editor/

您甚至可以导入图像或 CSS。

一个例子是:

background: #1e5799;
background: -moz-linear-gradient(top,  #1e5799 0%, #7db9e8 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1e5799), color-stop(100%,#7db9e8));
background: -webkit-linear-gradient(top,  #1e5799 0%,#7db9e8 100%);
background: -o-linear-gradient(top,  #1e5799 0%,#7db9e8 100%);
background: -ms-linear-gradient(top,  #1e5799 0%,#7db9e8 100%);
background: linear-gradient(to bottom,  #1e5799 0%,#7db9e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0 );

关于html - 纯css渐变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12785268/

相关文章:

html - 如何使用 CSS 仅将 HTML 选项元素的首字母大写?

c# - 如何读取样式值 [“display” ] webcontrol 的属性

javascript - 部署 Django 后纯 css javascript 不工作

html - 如何阻止 Images of Pure Grid Div 下的文本被压扁

javascript - jQuery 数据表标题与垂直滚动不对齐

html - Angular 8 : Set default selected value for select tag

javascript - 汉堡包按钮未使用 Material Design Lite 正确对齐

html - 将按钮附加到文本区域

css - 在 FireFox 中使用显示表格单元格和 float 元素时宽度错误