css - 有没有办法让这条径向渐变线变暗?

标签 css radial-gradients

尽管它是黑色的,但它显示为浅灰色。我不想让点变大。

https://jsfiddle.net/bek17q3t/1/

body,html
{
  background-color: #e7e6e6;
  height: 100%;
}
div
{
  position: relative;
  top: 10px;
  left: 30px;
  width: .25em;
  height: 100%;
  background-image: radial-gradient(circle closest-side,#000000 calc(100% - .25em),transparent 100%);
  background-repeat: repeat-y;
  background-size: .25em .75em;
}

最佳答案

body,html
{
  background-color: #e7e6e6;
  height: 100%;
}
div
{
  position: relative;
  top: 10px;
  left: 30px;
  width: .25em;
  height: 100%;
  background-image: radial-gradient(circle closest-side,#000000 calc(100% - .1em),transparent 100%);
  background-repeat: repeat-y;
  background-size: .25em .75em;
}
<div>
  </div>

更改计算方式。

关于css - 有没有办法让这条径向渐变线变暗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41992045/

相关文章:

ios - 类型 'UIImage' 没有成员 'radialGradientImage'

html - 如何让 css 渐变在这么多像素后停止?

CSS 后代选择器

html - 具有不透明背景的重叠 div

javascript - jquery 在 Chrome 中平滑滚动而不是在 Internet Explorer 中

css - 用于径向渐变和旋转+半径的跨浏览器 CSS

html - Div 自动 100% 宽

javascript - 仅水平滚动一个 div

CSS径向渐变?

html - Chrome 径向渐变显示不正确