SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: text fade-out?

  1. #1
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    395
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    text fade-out?

    Is it possible to make text fade-out from one color to another?

    The thing is I got a background pic. There's black text on it but on the far right the black text blends in with the pic.
    So I would like the text to slowly fade out to some lighter color.

    Is that possible in html/css or ?

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd need JavaScript, and even so, it would be a stretch. Check Dynamic Drive.

  3. #3
    Under Construction Poop_Shoot's Avatar
    Join Date
    Jul 2003
    Location
    Sacramento, CA
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check This Site Out!

    http://www.javascriptfx.com

  4. #4
    SitePoint Member mcintyrc's Avatar
    Join Date
    Dec 2002
    Location
    Lafayette, IN
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Roatating Color Java Script

    Here is some JavaScript to do the changing of a link color:
    Code:
    <script language="Javascript1.2"> 
    <!--
    function initArray() {
    
    this.length = initArray.arguments.length;
      for (var i = 0; i < this.length; i++) {
      this[i] = initArray.arguments[i];
      }
    }
    
    var ctext = "This message changes color !!!"
    var speed = 1000
    
    var x = 0
    
    var color = new initArray("red", 
    "blue", 
    "green",
    "black"
    );
    
    if(navigator.appName == "Netscape") {
    document.write('<layer id="c">'+ctext+'</layer><br>');
    }
    
    if (navigator.appVersion.indexOf("MSIE") != -1){
    document.write('<div id="c">'+ctext+'</div>');
    }
    
    function chcolor(){ 
    
    if(navigator.appName == "Netscape") {
    document.c.document.write('<font color="'+color[x]+'">'
    +ctext+'</font>');
    document.c.document.close();
    }
    
    else if (navigator.appVersion.indexOf("MSIE") != -1){
    document.all.c.style.color = color[x];
    }
    
    (x < color.length-1) ? x++  : x=0;
    } 
    
    setInterval("chcolor()",1000) 
    //-->
    </script>
    Pink: This is the message that you want to change color.
    Blue: This is the speed that the text will change color (in milliseconds).
    Brown: These are the actual colors that the text will change to. Each color is stated "color", . Just add and subtract that code from the Javascript and you'll be fine.

    PS::> I stole this from http://www.javascript-page.com/chcolor.html
    Thanks -- Chris
    Get Funny T-Shirts and Custom Printed T-Shirts @ ShirtsByMail.com

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Interesting...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •