Fading text black/white

By Korvin on Aug 18, 2009

EXAMPLE HERE

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

/******************/
/*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

Sign in to comment.
Korvin   -  Aug 20, 2009

really doesnt matter now does it?

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 fucking idiot...
dont ever try to "correct" me again.

 Respond  
D2K7   -  Aug 20, 2009
 /******************/
/*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>"; }
} 
/******************/
/*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

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.