Ver Mensaje Individual
  #4 (permalink)  
Antiguo 15/08/2014, 11:34
danibabasalom
 
Fecha de Ingreso: junio-2013
Ubicación: La Eliana
Mensajes: 38
Antigüedad: 10 años, 10 meses
Puntos: 0
Respuesta: Cambiar imagen al actualizar

Este es mi index.php

Código PHP:
Ver original
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <link rel="stylesheet" type="text/css" href="style/style.css">
  5.         <style type="text/css" media="screen">
  6.             <?php
  7.               $valor = rand(0, 3);
  8.               $imagenes = array("background-ms-0.jpg" , "background-ms-1.png" , "background-ms-2.png" , "background-ms-3.jpg");
  9.               echo "#cuerpo{ background-image: url(./img/".$imagenes[$valor].") no-repeat fixed center;}";
  10.             ?>
  11.         </style>
  12.     </head>
  13.     <body>
  14.         <div id="cuerpo">
  15.             <div id="menu">
  16.                 <ul id="menu-sel">
  17.                     <li><a href="">HISTORIA</a></li>
  18.                     <li><a href="">DESCARGAR</a></li>
  19.                     <li><a href="">GALERIA</a></li>
  20.                     <li><a href="">COMPARTE</a></li>
  21.                     <li><a href="">ABOUT</a></li>
  22.                 </ul>
  23.             </div>
  24.         </div>
  25.     </body>
  26. </html>


Y este mi style.css
Código CSS:
Ver original
  1. @font-face {
  2.     font-family: soopafre;
  3.     src: url(soopafre.ttf);
  4.     font-weight:400;
  5. }
  6.  
  7. body{
  8. background-color: black;
  9. margin: 0px;
  10. padding: 0px;
  11. overflow-x:hidden;
  12. overflow-y:hidden;
  13. }
  14. #cuerpo{
  15. position:relative;
  16. width: 960px;
  17. height: 640px;
  18. margin: 0 auto 0 auto;
  19.  
  20.     -webkit-background-size: auto 100%;
  21.     -moz-background-size: auto 100%;
  22.     -o-background-size: auto 100%;
  23.     background-size: auto 100%;
  24.  
  25. }
  26. #menu{
  27. margin: 0 auto 0 auto;
  28. position: relative;
  29. top: 170px;
  30.  
  31. }
  32. #menu-sel{
  33. list-style:none;
  34. text-align:center;
  35.  
  36.  
  37.  
  38. }
  39. #menu-sel li a{
  40. width:250px;
  41. height:65px;
  42. margin-top:10px;
  43.   display: block;
  44.   text-decoration: none;
  45.   background-image:url(../img/menu-tag.png);
  46.   font-family:soopafre;
  47.   color:#FADE25;
  48. margin: 0 auto 0 auto;  
  49. display: block;
  50.     vertical-align: middle;
  51.     line-height:60px;
  52.    
  53.  
  54. }
  55. #menu-sel li a:hover{
  56. background-color:#FADE25;
  57. opacity: 0.8;
  58. -webkit-border-radius: 5px;
  59. -moz-border-radius: 5px;
  60. border-radius: 5px;
  61. color:#F4F4F4;
  62. -webkit-transition: background 300ms ease-in-out;
  63. -moz-transition: background 300ms ease-in-out;
  64. -ms-transition: background 300ms ease-in-out;
  65. -o-transition: background 300ms ease-in-out;
  66. transition: background 300ms ease-in-out;
  67. }