Background-clip在Google网站中不起作用

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

<h1 style="background:white;color:blue;background-clip:text;">
    Eli's Opinion Website
</h1>

无效的部分是剪辑部分。其他一切正常。我只需要文本的背景在文本结束时结束即可。

html css
1个回答
0
投票

似乎使用display:inline-block可能会达到您想要的结果。

.header {
  display: inline-block;
  background: lightblue;
  color: blue;
}
<h1 class="header">
  Eli's Opinion Website
</h1>
© www.soinside.com 2019 - 2024. All rights reserved.