I want to make my heading text in my webpage like a gold I don’ want a color like this #ffd700
I want the same look and feel like any graphics designer can make gold effect in Photoshop. Here I am attaching an example how I want.
I want to make my heading text in my webpage like a gold I don’ want a color like this #ffd700
I want the same look and feel like any graphics designer can make gold effect in Photoshop. Here I am attaching an example how I want.
6
Answers
Use text-shadow property in css3 to get the gold effect you need. Refer http://css3gen.com/text-shadow/ for the best result.
Disclaimer
This is only available (at present) in webkit browsers
You could use the
property to get your desired outcome.
A sample would be:
In order for this to ‘work’ in a more cross browser way, I (for once) would have to suggest using an image for this one 🙁
I’ve made an example using gradient and shadow. Here’s HTML code:
Here’s CSS:
It looks like this:
I’m not a designer. So it’s hard for me to adjust colors for your needs. However, you may test it and adjust here @ codepen – link
Disclaimer: I have tested it only with Google Chrome. To make it working with different browsers you have to port
-webkit-tricks-...
, if possible.Edit based on comments, and more gradient effects.
I know you want to use CSS3 but as you mentioned HTML5 I’d like to post a canvas alternative here. You’ll get better browser support if you use a canvas element. The canvas 2D API has a method called createLinearGradient to apply a color gradient to a text by using different color stops:
Demo
You can also easily apply other effects such as text-shadows.
You can use
svg
to get effectOnline gradient generator for
svg
– http://10k.aneventapart.com/1/Uploads/319/You can try this for css text gold gradient:
Result:
or if you wanna explore another orientation you can check in css text gradient generator