How would I blend different colors instead of a boring one color heading
Hi, is it possible to put a heading in with more than one color, like blending a few colors, and also not just a different color for each character, but maybe a few colors like red,yellow,blue going into each character. Just to make text more exciting, than a one color text heading.
Thanks
you can do it with javascript, coloring letter or words, as your wish:
<script type="text/javascript">
var message = "The quick brown fox.";
var colors = new Array("#ff0000","#00ff00","#0000ff"); // red, green, blue
for (var i = 0; i < message.length; i++)
document.write("<span style=\"color:" + colors[(i % colors.length)] + ";\">" + message[i] + "</span>");
</script>
other than that, in CSS you have an option to choose the first letter or the first line and change its settings:
element:first-letter {font-size:30px;}
element:first-line {color:white;}
Where do I put script, under the css style/text, before everything else
Hi, thanks Chryaner,
Maybe Ill just learn to try do it in the graphics, but it will obviously be quicker to put it in code. Where do I put the script exactly, in with the css.
Do I put the <script type="text/javascript"> under <css style/text>
Bookmarks