Skip to content

Instantly share code, notes, and snippets.

@arvindang
Created April 28, 2014 19:14
Show Gist options
  • Save arvindang/11381350 to your computer and use it in GitHub Desktop.
Save arvindang/11381350 to your computer and use it in GitHub Desktop.
Creating text with a gradient background with just CSS. Very iOS 7.
body {
padding: 10px;
}
p {
background: -webkit-linear-gradient(top,#fd0b58 0,#a32b68 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
p {
color: black;
}
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odio explicabo dicta libero reprehenderit ab neque tempora est necessitatibus ipsum non pariatur aliquam excepturi cupiditate dolor doloribus consectetur sunt beatae totam.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment