在做文字背景剪切的时候用到   -webkit-background-clip: text,属性

<style>
    div{
      /* background-color:crimson; */
      background: url(images/2.jpg);
      background-size: cover;
      width: 300px;
      height: 300px;
      font-size: 60px;
      text-align: center;
      font-weight: bold;
      line-height: 300px;
      color:transparent;
      -webkit-background-clip: text;
    }
</style>
<div>
    content
</div>

效果图如下: 

css文字背景剪切

 

相关文章:

  • 2022-12-23
  • 2021-12-26
  • 2021-12-06
  • 2021-06-22
猜你喜欢
  • 2022-01-01
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案