Top

Fading text black/white


PHP Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Aug 18, 2009
Last Updated  Aug 18, 2009
Tags  black  fading  php  text  white 

Introduction

EXAMPLE HERE

this can be transformed to do whatever you need, I just made it to mess around

Grab the Code

/******************/
/*White Background*/
/******************/
for($i = 1; $i < 12; $i++){
 if ($i == 11) { echo "<p style='color:#fff'>".$i."</p>"; }
 elseif ($i == 10) { echo "<p style='color:#ccc'>".$i."</p>"; }
 elseif ($i < 10) { echo "<p style='color:#".str_repeat($i,3)."'>".$i."</p>"; }
}
 
/******************/
/*Black Background*/
/******************/
for($i = 1; $i < 12; $i++){
 if ($i == 1) { echo "<p style='color:#fff'>".$i."</p>"; }
 elseif ($i == 2) { echo "<p style='color:#ccc'>".$i."</p>"; }
 elseif ($i > 2) { echo "<p style='color:#".str_repeat(12-$i,3)."'>".$i."</p>"; }
}

Comments

  (2)  RSS
D2K7
Comments: 24
 
PHP Snippet:  Fading text black/white
Posted on Aug 20, 2009 12:48 am
Code:
 /******************/
/*White Background*/
/******************/
for($i = 1; $i < 12; $i++){
 if ($i == 11) { echo "<p style='color:#fff'>".$i."</p>"; }
 elseif ($i == 10) { echo "<p style='color:#ccc'>".$i."</p>"; }
 elseif ($i < 10) { echo "<p style='color:#".str_repeat($i,3)."'>".$i."</p>"; }
}
 
/******************/
/*Black Background*/
/******************/
for($i = 1; $i < 12; $i++){
 if ($i == 1) { echo "<p style='color:#fff'>".$i."</p>"; }
 elseif ($i == 2) { echo "<p style='color:#ccc'>".$i."</p>"; }
 elseif ($i > 2) { echo "<p style='color:#".str_repeat(12-$i,3)."'>".$i."</p>"; }
}


Code:

/******************/
/*White Background*/
/******************/
for($i = 1; $i < 12; $i++){
 if ($i == 11) { echo "<q style='color:#ccc'>".$i."</q>"; }
 elseif ($i == 10) { echo "<q style='color:#fff'>".$i."</q>"; }
 elseif ($i < 10) { echo "<q style='color:#".str_repeat($i,3)."'>".$i."</p>"; }
}
 
/******************/
/*Black Background*/
/******************/
for($i = 1; $i < 12; $i++){
 if ($i == 1) { echo "<q style='color:#ccc'>".$i."</q>"; }
 elseif ($i == 2) { echo "<q style='color:#fff'>".$i."</w>"; }
 elseif ($i > 2) { echo "<q style='color:#".str_repeat(12-$i,3)."'>".$i."</q>"; }
}
Still good though ^^ 4/10
Korvin
Comments: 336
 
PHP Snippet:  Fading text black/white
Posted on Aug 20, 2009 2:22 am
really doesnt matter now does it?

Code:

elseif ($i == 2) { echo "<q style='color:#fff'>".$i."</w>"; }
 elseif ($i < 10) { echo "<q style='color:#".str_repeat($i,3)."'>".$i."</p>"; }

wtf?
youre a !@#$ idiot...
dont ever try to "correct" me again.

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom