Skip to content

Instantly share code, notes, and snippets.

@litopia
Created February 3, 2016 20:13
Show Gist options
  • Save litopia/25db9d237092b59284fc to your computer and use it in GitHub Desktop.
Save litopia/25db9d237092b59284fc to your computer and use it in GitHub Desktop.
Text gradient
webkit only
```css
.text-gradient
background: linear-gradient(145deg, #CFE02F, #F7901E)
-webkit-background-clip: text
-webkit-text-fill-color: transparent
```
cross browser using svg
``` html
<svg class="hero-svg" height="150px">
<defs>
<linearGradient id="gradPatten" x1="0%" y1="15%" x2="60%" y2="80%" >
<stop offset="0%" style="stop-color:rgb(207,224,47);stop-opacity: 1"/>
<stop offset="100%" style="stop-color:rgb(247,144,30); stop-opacity: 1"/>
</linearGradient>
</defs>
<text class="hero-svg-title" x="0" y="1.5em" fill="url(#gradPatten)">
Bring your data
<tspan x="0" y="2.7em">stories to life</tspan>
</text>
</svg>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment