如何将文本重叠背景设置为白色而溢出外部为不同颜色?

问题描述 投票:2回答:1

我想用文字重叠圆圈。我如何才能使圆圈内的文字为蓝色而圆圈内的文字颜色为纯白色?

https://codepen.io/anon/pen/LQvZPV

<svg class="box">
   <circle></circle>
</svg>
<h1>Lorem ipsum dolor sit</h1>

h1 {
  font-size: 72px;
  font-weight: 800;
  max-width: 200px;
  color: #2f78e1;
  mix-blend-mode: screen;
}

.box {
  height: 200px;
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  background: #2f78e1;
  z-index: -1;
  background-blend-mode: color-burn;
  border-radius: 50%;
  color: blue;
}
css
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.