Created
January 26, 2011 22:39
-
-
Save Cifro/797655 to your computer and use it in GitHub Desktop.
When will be Opera support CSS3 gradients?
This file contains hidden or 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 | |
// gradient-bg.svg from http://www.display-inline.fr/projects/css-gradient/ | |
// with Opera option | |
$file = file_get_contents(__DIR__ . '/gradient-bg.svg'); | |
$out = preg_replace("/\s+/", ' ', $file); | |
$out = base64_encode($out); | |
$dataurl = 'data:image/svg+xml;base64,'; | |
echo '<pre style="pre-wrap; word-wrap: break-word;">'; | |
echo $dataurl . $out; | |
echo '</pre>'; | |
echo '<pre style="pre-wrap; word-wrap: break-word;">'; | |
echo 'background-image: url("' . $dataurl . $out . '");'; | |
echo '</pre>'; | |
echo '<pre style="pre-wrap; word-wrap: break-word;">'; | |
echo htmlspecialchars('<img src="' . $dataurl . $out. '">'); | |
echo '</pre>'; | |
echo '<img src="' . $dataurl . $out. '">'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment