HTTP/1.0 200 OK Accept-Ranges: none Content-Location: http://www.skyandstars.net/cambiar-color-de-fondo-de-web-dinamicamente/ Content-Type: text/html; charset=UTF-8 Date: Sun, 15 Aug 2010 08:09:45 GMT Set-Cookie: PREF=ID=bb725aa855989f11:TM=1281859785:LM=1281859785:S=CqEPFeuiKbCWfwLH; expires=Tue, 14-Aug-2012 08:09:45 GMT; path=/; domain=translate.googleusercontent.com X-Content-Type-Options: nosniff Server: translation Expires: Sun, 15 Aug 2010 08:09:45 GMT Cache-Control: private
Sicuro che hai visto diversi siti web che offrono l'effetto di modificare o sfondo progettazione con un solo click di distanza, mi venne in mente una forma semplice e di alcuni PHP, qui lascio il video tutorial su come ottenere questo effetto straordinario.
* Ci scusiamo per il disagio con l'audio
Ecco il risultato finale del tutorial
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < html xmlns = "http://www.w3.org/1999/xhtml" > < head > < meta http - equiv = "Content-Type" content = "text/html; charset=iso-8859-1" /> < title > Documento sin t & iacute ; tulo </ title > <?php $fondo = $_GET [ 'color' ] ; $personal = $_GET [ 'colorpersonal' ] ; if ( $personal == '' ) { if ( $fondo == 'Naranja' ) { ?> < style type = "text/css" > body { background : #FF9900; } </ style > < link rel = "stylesheet" href = "estilo-naranja" type = "text/css" /> <?php } //del if naranja elseif ( $fondo == 'Verde' ) { ?> < style type = "text/css" > body { background : #00FF33; } </ style > <?php } //cierra el elseif verde else { ?> < style type = "text/css" > body { background : #33CCCC; } </ style > <?php } //del else (original) } //del if principal else { ?> < style type = "text/css" > body { background : <?php echo $personal ; ?> ; } </ style > <?php } ?> </ head > < body > < h1 > Selecciona el color de fondo que quieras para la pagina </ h1 > < form action = "" method = "get" > < p > Selecciona un color de fondo </ p > < select name = "color" > < option selected = "selected" > Original </ option > < option > Naranja </ option > < option > Verde </ option > </ select > < p > o ... Escribe tu color hexadecimal </ p > < input type = "text" name = "colorpersonal" /> < input name = "" type = "submit" value = "Cambiar Color" /> </ form > </ body > </ html > <! DOCTYPE HTML PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> html xmlns <= "http : / / www.w3.org/1999/xhtml "> <head> <meta =" http-equiv Content-Type testo =" "content / charset = html; iso-8859-1 "/> <title> Documento sin t & iacute; titolo </ title> <? php $ sfondo = $ ['colore _GET']; personali $ = $ _GET ['colorpersonal'] se $ personale (=='') (if ($ profondità == 'Orange') (?> tipo <style = "text / corpo css"> (background: # FF9900;) </ style> link rel <= "stylesheet href" = "arancione stile" "type =" text / css " /> <? php) / / l'arancione se elseif ($ profondità == 'verde') (?> tipo <style = "text / corpo css"> (background: # 00FF33;) </ style> <? php) / / chiudere il verde elseif else (?> tipo <style = "text / corpo css"> (sfondo: # 33CCCC;) </ style> <? php) / / di altro (originale)) / / altrimenti il principale, se (?> tipo <style = "text / corpo css"> (sfondo: <? php echo $ ;?>;) <personale / style> <? php)?> </ head> <body> <h1> Seleziona colore di sfondo desiderato per la </ h1> <form azione di pagina = metodo = "" "get"> <p> Scegli un <colore di sfondo / p> name = <select "color"> opzione <selected = "selected > Original </ option> <option> Orange </ option> <option> verde </ option> </ select <p> o> esadecimale del colore ... Scrivere <"/ p> input type <=" text "name = "/ colorpersonal <input nome "" "submit" = = tipo di valore>" = "Change Color" /> </ form> </ body> </ html> |

Michael è il creatore ed editore di skyandstars.net che pubblica guide e tutorial per WordPress, CuteNews, PHP, HTML e altro ancora. Sono uno studente di college corrente.
Valpo
26 maggio 2010
Woow!, Demasiadoo sapere! Haha, io ti ammiro veramente, arrivederci e grazie per le informazioni! ...