webkit-background-clip

webkit-background-clip

.element {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  -webkit-background-clip: text; /* WebKit 私有前缀 */
  background-clip: text;         /* 标准写法 */
  color: transparent;            /* 文字必须透明 */
  -webkit-text-fill-color: transparent; /* Safari 兼容 */
}

image

posted @ 2026-04-09 10:02  博讯科技工作室  阅读(25)  评论(0)    收藏  举报