Created
October 10, 2009 19:02
-
-
Save johnduhart/207052 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Gunski demo</title> | |
<link rel="stylesheet" href="style.php" type="text/css" /> | |
</head> | |
<body> | |
<h1>Note the changing background</h1> | |
<p>compwhizii, 2009</p> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The following CSS is static, pulled from style.css */ | |
h1 { | |
font-size: 12px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$css = file_get_contents("style.css"); | |
$colors = array("#FFFFFF", "#AAAAAA", "#b4b4b4", "#a9a9a9"); | |
$css .= "/* The following CSS is dynamic */\n\n"; | |
$css .= "body { background: ".($colors[rand(0,3)])."; }\n"; | |
echo $css; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment