<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        div {
            width: 100px;
            height: 100px;
            background: url('test.jpg');
            -webkit-background-clip: text; 
            font-size: 30px;
            color: transparent;
        }
    </style>
    <title>Document</title>
</head>
<body>
    <div>Lorem</div>
</body>
</html>

  效果图:

CSS3文字遮罩 background-clip

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-07-08
  • 2022-12-23
  • 2021-05-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-12
  • 2022-02-19
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案