【发布时间】:2022-01-26 00:56:39
【问题描述】:
我需要用图片中的点来设置元素背景的样式。从网上尝试了很多,但我需要和图片中的完全一样
我不明白所有与线性渐变相关的东西,例如“背景混合”、“径向渐变”,但我无法得到我想要的。
background:
linear-gradient( /* background color fading left to right , to blend with every others gradient bg */
to left,
#fff,
#fff),
repeating-linear-gradient( /* horizontal white lines hidding a row of dots */
to bottom,
transparent 0,
transparent 32px,
white 32px,
white 40px,
transparent 40px
),
repeating-linear-gradient( /* vertical lines hidding a col of dots */
to right,
transparent 0,
transparent 32px,
white 32px,
white 40px,
transparent 40px
),
radial-gradient( /* dot repeated via background-size */
circle at 5px 5px,
#2f4e79 1px,
transparent 2px,
transparent 8px
)
0 0 / 8px 8px;
background-blend-mode:
multiply, /* only blend the first layer to keep dots hidden */
normal,
normal,
normal;
【问题讨论】:
-
尝试在jsbin这样的沙盒上为我们提供最新的工作代码
标签: javascript html css frontend