Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
Dann verstehe ich Dein zaudern nicht.Das ist schon klar.
Einen Favoriten gibt's bei mir nicht - siehe meine erste Antwort:Welche wäre dein Favorit? Warum?
Vermutlich normale CSS-Sprites oder?
Bis auf 3.) und 5.) kommt bei mir seit jeher der Rest zum Einsatz, je nachdem, was im Einzelfall opportun ist, und in welchem Umfang Grafiken einzubinden sind. Und mit dem Bootstrap-Framework stehen mir zudem schicke Glyphicons zur Auswahl.
<script type="text/javascript" src="./script/modernizr.js"></script>
<script>
$(document).ready(function()
{
if (!Modernizr.svg)
{
$('header > logo > h1').css('background-image', 'none');
$('header > logo > h1').css('background-color', '#ff0000');
}
});
</script>
$SVG_File = 'logo.svg';
header('Content-Type: image/svg+xml');
header('Content-Length: ' . filesize($SVG_File));
echo file_get_contents($SVG_File);
#logo
{
background-image: url("./image/sprite.php");
background-repeat: no-repeate;
background-size: cover;
}
no-repeat ohne e am Ende.CSS:background-repeat: no-repeate;
if($_GET["image"] == "logo")
{
if($_GET["svg"] == "true")
{
$SVG = 'logo.svg';
header('Content-Type: image/svg+xml');
header('Content-Length: ' . filesize($SVG));
echo file_get_contents($SVG);
}
if($_GET["svg"] == "false")
{
echo './images/logo.png';
}
if (empty($_GET["svg"]))
{
$SVG = 'logo.svg';
header('Content-Type: image/svg+xml');
header('Content-Length: ' . filesize($SVG));
echo file_get_contents($SVG);
}
}
header > h1
{
width: 298px;
height: 60px;
background-image: url("./image/sprite.php?image=logo");
background-repeat: no-repeat;
background-size: cover;
}
<script type="text/javascript" src="./script/modernizr.js"></script>
<script>
$(document).ready(function()
{
if (!Modernizr.svg)
{
$('header > h1').css('background-image', 'url(./image/sprite.php?image=logo&svg=false)');
}
else
{
$('header > h1').css('background-image', 'url(./image/sprite.php?image=logo&svg=true)');
}
});
</script>
Zu viel Aufwand und Code für ein popeliges (Sprites)Hintergrundbild.Wie wäre dieser Ansatz in euren Augen?