home *** CD-ROM | disk | FTP | other *** search
/ HTML Examples / 01_firstpage.iso / index.php < prev   
Encoding:
Text File  |  2016-01-01  |  2.6 KB  |  111 lines

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <title></title>
  6. <!--<meta http-equiv="refresh" content="10">-->
  7. <style>
  8. body, html {
  9.   height: 100%;
  10.   margin: 0;
  11. }
  12.  
  13. .bg {
  14.   /* The image used */
  15.   background-image: url("bg/mb.jpg");
  16.  
  17.   /* Full height */
  18.   height: 100%;
  19.  
  20.   /* Center and scale the image nicely */
  21.   background-position: center;
  22.   background-repeat: no-repeat;
  23.   background-size: cover;
  24. }
  25. </style>
  26. <style>
  27. div.fixed {
  28.   position: fixed;
  29.   top: 0 ; // bottom: 0;    //
  30.   left: 0;
  31.   width: 350px;
  32.   text-align: center;
  33.   font-size: 20px;
  34.   line-height: 60%;
  35.   background-color: coral;
  36.   border: 5px solid #FF0000;
  37. }
  38. div.fixed2 {
  39.   position: fixed;
  40.   top: 160 ; // bottom: 0;    //
  41.   left: 0;
  42.   width: 600px;
  43.   text-align: left;
  44.   font-size: 20px;
  45.   line-height: 60%;
  46.   background-color: coral;
  47.   border: 5px solid #FF0000;
  48. }
  49. </style>
  50. </head>
  51. <body class="bg" onload="startTime()">
  52.  
  53. <div  class="fixed" id="txt"></div>
  54. <br><br><br><br><br>
  55. <div  class="fixed2" id="txt2"></div>
  56. <br><br><br><br><br>
  57. <div  class="fixed2" id="txt3"></div>
  58. <!--<div style="background-color: tomato; color: white; padding: 10px;" id="txt2"></div>-->
  59. <div id="txt5" style="position:absolute; left:650px; top:66px; width:600px; border:none;"><img src="bg/002.jpg" width="600" alt="" ></div>
  60. <script>
  61. function startTime() {
  62.   var today = new Date();
  63.   var y = today.getFullYear() ;
  64.   var a = today.getMonth() + 1 ;
  65.   var d = today.getDate();
  66.   var h = today.getHours();
  67.   var m = today.getMinutes();
  68.   var s = today.getSeconds();
  69.   // add a zero in front of numbers<10
  70.   a = checkTime(a);
  71.   d = checkTime(d);
  72.   m = checkTime(m);
  73.   s = checkTime(s);
  74.   checkTime3(s);
  75.   document.getElementById("txt").innerHTML = "<h1>" + y + "." + a + "." + d + "_" + h + ":" + m + ":" + s + "</h1>";
  76.   var t = setTimeout(function(){ startTime() }, 1000);
  77. }
  78.  
  79.  
  80. function checkTime(i) {
  81.   if (i < 10) {
  82.     i = "0" + i;
  83.   }
  84.   return i;
  85. }
  86.  
  87.  
  88. function checkTime3(i) {
  89.     var t1 = ( i / 2 );
  90.     var t2 = Math.floor(i / 2);
  91.         var h;
  92.         var k = '' ;
  93.         for (h = 0; h < t1; h++)
  94.         {
  95.             var k = k + "." ;
  96.         }
  97.         var t3 = "Read data " + k ;
  98.         var t4 = "Write data " + k ;
  99.         var p = ( Math.floor(i / 8) + 1 ) * 2 ;
  100.         if( p < 10 ){ p = "0" + p ;}
  101.       document.getElementById("txt2").innerHTML = "<h1>" + t3 + "</h1>";
  102.       document.getElementById("txt3").innerHTML = "<h1>" + t4 + "</h1>";
  103.         document.getElementById("txt5").innerHTML = "<h1>Copy image ... </h1><img src=bg/0" + p + ".jpg width=600>"
  104. }
  105.  
  106. </script>
  107. -->
  108.  
  109. </body>
  110. </html>
  111.