<p>单个词或单行文本渐变填充效果</p>
body {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3vw;
  font-weight: bold;
}

p {
  padding: 5px 10px;
  background-image: linear-gradient(to right, deeppink, dodgerblue);
  -webkit-background-clip: text;
  color: transparent;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.