Effekt: (Haut aus einer DIV aus, wählen Sie das gewünschte Bild, das Sie als Webhintergrund speichern möchten.)
Wichtig: Cookie Save Status
HTML -Code:
<body> <div id = "header"> <div id = "header_con"> <div> <a href = "javaScript:;" onclick = "showImgbox ()"> Haut Ersatz </a> </div> </div> </div> <div id = "dimgbox"> <diviD = "dimgtitle"> <div id = "imgtitle_con"> <div id = "title1"> <a href = "javascript:;" href = "JavaScript:;" onclick="hideImgBox()">Close</a></div> </div> </div> <div id="imglist"> <div><img src="image/bg0.jpg" /></div> <div><img src="image/bg1.jpg" /></div> <div><img src="image/bg2.jpg" /></div> <div><img src="image/bg3.jpg" /></div> <div><img src="image/bg4.jpg" /></div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div>
CSS -Code:
* {Margin: 0px; Polsterung: 0px;}#Header {Höhe: 40px; Breite: 100%; Hintergrund:#000000;} A {Textdekoration: Keine;}. DBG {float: links;}#dimgbox {width: 100%; Höhe: 140px; /*Position: absolut;*/ Hintergrund: #ffffff; Oben: 0px; links: 0px; Anzeige: Keine;}#dimgtitle {Höhe: 40px; Breite: 100%; Border-Bottom: Solid 1px #ccc;} #imgtitle_con {width: 1180px; Höhe: 40px; Rand: 0px Auto; Zeilenhöhe: 40px;}#title1 {float: links;}#title1 a {display: block; Hintergrund:#04a6f9; Höhe: 40px; Farbe: #ffffff; text-align: center;}#title2 {float: rechts;}#imglist {Höhe: 65px; Breite: 1180px; Rand: 0px Auto;}. Imgitem {float: links; Rand: 10px; Rand-Links: 5px;}. Imgitem img {width: 100px;}JS -Code:
Funktion showImgbox () {$ ("#dimgbox"). // 6. + $ .cookie ("BG-Pic") + "')"); //} // 1. Verwenden Sie es als Hintergrundstil der Webseite $ ("Körper").Reproduktionsbild:
Der obige einfache Beispielcode zum Nachahmung der Ersatzfunktion von Baidu Skin ist der gesamte Inhalt, den ich mit Ihnen teile. Ich hoffe, Sie können Ihnen eine Referenz geben und ich hoffe, Sie können wulin.com mehr unterstützen.