<b>REGISTER</b>

GFX-Sector - Javascript & jQuery


 
GFX-Sector » Coding Area » Webentwicklung » Javascript & jQuery » BG wechsel je nach Bildschirmauflösung » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites

Javascript & jQuery

Probleme, Fragen oder sonstiges mit JavaScript, jQuery und co? Hier bist du richtig!
Post New Thread Post Reply

BG wechsel je nach Bildschirmauflösung

     Deutsche Version  English version
Author
Post « Previous Thread | Next Thread »

Laxila Laxila is a male
Fingerwischer


Avatar von Laxila

Registration Date: 08.02.2009
Posts: 34
Location: NDS / Cuxhaven
Program: Photoshop CS3

Spacer
BG wechsel je nach Bildschirmauflösung

BG wechsel je nach Bildschirmauflösung

      

Hey Leute gibt es eine Möglichkeit mit CSS, dass je nachdem wie die Bildschirmauflösung des Besuchers der Seite ist der Hintergrund wechselt?
Wäre nett wenn ihr mir einen Code geben könntet weil ich mit CSS nicht so vertraut bin.

Vielen Dank im vorraus! Super


MFG Laxila

My latest Creation!

BG wechsel je nach Bildschirmauflösung 02.07.2009 16:06 Laxila is offline Homepage of Laxila Search for Posts by Laxila

quantum quantum is a male
Pfadfinder

Spender


Avatar von quantum

Registration Date: 29.12.2008
Posts: 721
Deviantart: xcracx

Spacer
      

Na mit CSS wirst du da bestimmt nich fündig o0

versuchs mal mit javascript.
da hast du die möglichkeit auf die informationen, die der Browser des nutzers gibt, zuzugreifen.

machste halt ne if abfrage, und änderst dann den passen BG ab.

schau mal auf selfhtml.org

solltest dir da ganz leicht was zusammenbasteln können Wink

lg



BG wechsel je nach Bildschirmauflösung 03.07.2009 00:28 quantum is offline Homepage of quantum Search for Posts by quantum

WikiWiki^_^ WikiWiki^_^ is a male
Buntstiftmaler


Avatar von WikiWiki^_^

Registration Date: 03.07.2009
Posts: 90
Location: Spanien
Program: Adobe Photoshop CS3

Spacer
      

Hm ne CSS klappt ganz sicher nicht. Eventuell bei CSS 3
@CrAc: Hm wäre möglich, aber if gehört doch eig nich zu javascript, sondern zu PHP, oder irre ich mich? Wink



BG wechsel je nach Bildschirmauflösung 03.07.2009 13:19 WikiWiki^_^ is offline Search for Posts by WikiWiki^_^

Laxila Laxila is a male
Fingerwischer


Avatar von Laxila

Registration Date: 08.02.2009
Posts: 34
Location: NDS / Cuxhaven
Program: Photoshop CS3

Thread Starter Thread Started by Laxila
Spacer
      

naja ich werd ma bissl was suchen^^
war nur wegen css, weil ich das bei meinem myspace profil machen wollte und bei myspace funzt ja nur css Wink



MFG Laxila

My latest Creation!

BG wechsel je nach Bildschirmauflösung 03.07.2009 16:12 Laxila is offline Homepage of Laxila Search for Posts by Laxila

quantum quantum is a male
Pfadfinder

Spender


Avatar von quantum

Registration Date: 29.12.2008
Posts: 721
Deviantart: xcracx

Spacer
      

Ja auch mit CSS3 leider noch nicht möglich Wink

Und if abfragen soltle es in jeder Programmier/Scriptsprache mit Kontrollstrukturen geben Wink

also gibts großes Grinsen



BG wechsel je nach Bildschirmauflösung 03.07.2009 19:39 quantum is offline Homepage of quantum Search for Posts by quantum

razkoo
Weichzeichner


Avatar von razkoo

Registration Date: 25.08.2008
Posts: 63
Deviantart: razkoo

Spacer
      

Ich hab diesen Codeschnipsel irgendwo gefunden:

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
<SCRIPT language="JavaScript">
<!-- var breite = screen.width;
 if (breite == "1280")location.href="impressum.html";
else
 if (breite == "1152")location.href="impressum.html";
else
 if (breite == "1024")location.href="index.html"; 
else
 if (breite == "800")location.href="index.html"; //--> </SCRIPT>


Das dürfte deinen Vorstellungen entsprechen, oder? Nur, dass du halt anstatt den User weiterzuleiten, die CSS - Klasse vom Body ändern musst.



großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen großes Grinsen
cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool cool
böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse böse
BG wechsel je nach Bildschirmauflösung 29.12.2009 11:11 razkoo is offline Search for Posts by razkoo

quantum quantum is a male
Pfadfinder

Spender


Avatar von quantum

Registration Date: 29.12.2008
Posts: 721
Deviantart: xcracx

Spacer
      

Sähe dann in dem Fall so aus:

php:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
<script type="text/javascript">
var breite screen.width;

 if (breite == "1280"body.document.style.background-image "url(la/le/lu.jpg);";
else
 if (breite == "1152"body.document.style.background-image "url(la/le/lu.jpg);";
else
 if (breite == "1024"body.document.style.background-image "url(la/le/lu.jpg);"; 
else
 if (breite == "800"body.document.style.background-image "url(la/le/lu.jpg);"</script>


Aber ich weis nicht ob das funktioniert, meine javascript-fähigkeiten sind wohl eingerostet Wink



BG wechsel je nach Bildschirmauflösung 01.01.2010 20:35 quantum is offline Homepage of quantum Search for Posts by quantum
 
Spacer
   
GFX-Sector
unregistered


 hat kein Avatar


Spacer

Have you enjoyed this topic?


If you were enjoying this post and if you keen on reading more interesting stuff then do not hesitate to complete the free sign up.

After the free registration you will gain access to all areas and you will be able to communicate with other artists from all over the world.

In addition you will benefit from our Photoshop and coding section as well as from our huge (hundreds of gigabytes) free resource section where you can find everything you will need to be a successful (web) designer/artist.

Sign up now and enjoy the advantages as a registered member.

(This website will be ad-free after a complete free sign up.)

New Post 01.01.2010 20:35  
Tree Structure | Board Structure
Post New Thread Post Reply
GFX-Sector » Coding Area » Webentwicklung » Javascript & jQuery » BG wechsel je nach Bildschirmauflösung

Similar topics to BG wechsel je nach Bildschirmauflösung
Thread
Etwas neues nach einer kleinen Pause (Forum: Signaturen/Avatare)
3 Sigs nach ner Langen Pause. (Forum: Signaturen/Avatare)
Killuah sucht die Nacht (Forum: Gifts)
1 Attachments attached Frohe Weihnachten!!! (Forum: News)
[Anime] Gute Nacht ihr alle :P (Forum: Signaturen/Avatare)