Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Wechselnder Hintergrund je nach Uhrzeit

Empfohlene Antworten

Veröffentlicht

Hallo ich möchte den Besucher auf meine Homepage immer vermitteln das sich was tut.

dies unteranderem möchte ich oben in meiner spalte oben im header den Background je nach uhrzeit 3 mal ändern sprich user geht um 09 00 rein kommt BG 1 um 12:01 kommt BG2 und ab 12:02 bis um 00 uhr der 3 Background wie geht sowas

ohne zu wissen in welcher Sprache du dir das gedenkst und jetzt mal pauschal zur Anregung nur mit 2 Bildern

<script>

<!--

var current= new Date()

var day_night=current.getHours()

if (day_night<=12)

document.write("<img src='day.gif'>")

else

document.write("<img src='night.gif'>")

//-->

</script>

sollte denke ich mal so funktionieren, ohne zu probieren

<?

$time = date('H',time());

if($time < '9' && $time > '0') {

//bg1

} elseif($time > '9' && $time < '12') {

//bg2

} else {

//bg3

}

?>

Sollte gehen.

(nicht getestet)

greetz

also in PHP ist die seite

Das ist PHP:

<?

$time = date('H',time());

if($time < '9' && $time > '0') {

//bg1

} elseif($time > '9' && $time < '12') {

//bg2

} else {

//bg3

}

?>

Sollte gehen.

(nicht getestet)

greetz

greetz

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.