翻转图像和div不出现在IE11中

时间:2014-10-08 17:30:51

标签: html css image internet-explorer-11 rollover

我有一个网站,我第一次建立了一个名为www.heyjesse.uk的网站,它现在正在进行中。然而,该网站在Chrome等完美的工作,但当我用Internet Explorer 11打开它时,我在div中的翻转图像不会出现?我真的无法解决原因!它会出现,如果我徘徊在它上面,div也错过了它的左边缘?

http://jsfiddle.net/xcsh1zjt/

为此提供任何帮助?

  <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Hey Jesse</title>
  <style type="text/css">
  @import url("styles.css");
  </style>
  <script type="text/javascript">
  function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  }
  function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  }

  function MM_findObj(n, d) { //v4.01
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
  }

  function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
     if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  }
  </script>
  </head>
  <link href='http://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
  <link href='http://fonts.googleapis.com/css?family=Permanent+Marker' rel='stylesheet' type='text/css'>
  <body onload="MM_preloadImages('ME2 smaller color.png')">

  <div id="containban">
  <div id="colorchanger">

  <div class="white"
  onmouseover="document.bgColor='white'"></div>

  <div class="yellow"
  onmouseover="document.bgColor='yellow'"></div>

  <div class="orange"
  onmouseover="document.bgColor='orange'"></div>

  <div class="coral"
  onmouseover="document.bgColor='coral'"></div>

  <div class="brown"
  onmouseover="document.bgColor='brown'"></div>

  <div class="red"
  onmouseover="document.bgColor='red'"></div>

  <div class="fusia"
  onmouseover="document.bgColor='fusia'"></div>

  <div class="magenta"
  onmouseover="document.bgColor='magenta'"></div>

  <div class="purple"
  onmouseover="document.bgColor='purple'"></div>

  <div class="navy"
  onmouseover="document.bgColor='navy'"></div>

  <div class="blue"
  onmouseover="document.bgColor='blue'"></div>

  <div class="royalblue"
  onmouseover="document.bgColor='royalblue'"></div>

  <div class="skyblue"
  onmouseover="document.bgColor='skyblue'"></div>

  <div class="seagreen"
  onmouseover="document.bgColor='seagreen'"></div>

  <div class="olivedrab"
  onmouseover="document.bgColor='olivedrab'"></div>

  <div class="green"
  onmouseover="document.bgColor='green'"></div>

  <div class="black"
  onmouseover="document.bgColor='black'"></div>

  </div>



  <div id="container">
    <a href="#"><div class="menu">
    <p class="p1">HOME</p>
    <p class="p2">WHO AM I?</p>
    </div>
    </a>

    <a href="#"><div class="menu1">
    <p class="p1">GALLERY</p>
    <p class="p2">THIS IS MY GALLERY</p>
    </div>
    </a>

    <a href="#"><div class="menu2">
    <p class="p1">PROJECTS</p>
    <p class="p2">MY ART COLLECTION</p>
    </div>
    </a>

    <a href="#"><div class="menu3">
    <p class="p1">CONTACT</p>
    <p class="p2">CONTACT ME</p>
    </div>
    </a>
    </div>
  </div>


  <div id="main">
    <div align="right"><a href="#" style="text-align: right" onmouseover="MM_swapImage('Jesse Davies','','ME2 smaller color.png',1)" onmouseout="MM_swapImgRestore()"><img src="ME2 smaller.png" alt="Jesse Davies" name="me" width="399" height="308" class="float-right" id="Jesse Davies" /></a><span style="text-align: left"></span></div>
    <p><span class="bold">Hey there, thanks for visiting my site. Your probably wondering who this </span><span class="bluetext">Jesse Davies</span><span class="bold"> is right?</span> <br />
      <br />
    Well, based in Kent I consider myself to be an all round designer who has a very creative personality! I started with creating art work in my spare time which then kinda led me onto photography work.<br />
    As well as creating intriguing art work I have always been a geek with playing with computers! So after playing with my photography on Photoshop I decided started to look at building websites with Dreamweaver, mixing the two main talents that i have, my IT  and  creative skills, just so happens that I <span class="funtext">LOVE</span> it, and it would be a dream of mine to build a career in this industry! </p>
    <p class="centre">Feel free to check out my work on this site!</p>
  </div>
  </body>
  </html>

CSS是......       @charset&#34; utf-8&#34 ;;       是{text-装饰:无;       }

  #main{
      color:rgba(255,255,255,1);
      background-color: rgba(51,51,51,1);
      width: 915px;
      margin-top: 15px;
      margin-left: auto;
      margin-right: auto;
      border-radius: 50px;
      -moz-border-radius: 50px;
      -webkit-border-radius: 50px;
      text-align: left;
      position: relative;
      height: 308px;
      font-family: 'Architects Daughter', cursive;
      text-shadow: 4px 4px 5px #000;
      font-size: 14px;
      padding-top: 1.5px;
      padding-right: 5px;
      padding-bottom: 0px;
      padding-left: 20px;
      }
  .float-right {
      float: right;
  }



  #colorchanger{
      height: 15px;
      width: 915px;
      position: relative;
      margin-right: auto;
      margin-left: auto;
      margin-top: 10px;
      margin-bottom: 10px;
      }

  .white{
      background-color: white;
      height: 1px;
      width: 10px;
      padding: 5px;
      margin-right: 17.875px;
      border-radius:500px;
      -moz-border-radius: 500px;
      -webkit-border-radius: 500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;

  }
  .coral{   
      background-color:coral;
      height: 1px;
      width: 10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius: 500px;
      -webkit-border-radius: 500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .yellow{
      background-color: yellow;
      height: 1px;
      width: 10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius: 500px;
      -webkit-border-radius: 500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .orange{
      background-color: orange;
      height: 1px;
      width: 10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius: 500px;
      -webkit-border-radius: 500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .brown{
      background-color:brown;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .red{
      background-color:red;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .fusia{
      background-color:rgba(255,0,128,1);
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .magenta{
      background-color:magenta;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .purple{
      background-color:purple;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .navy{
      background-color:navy;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .blue{
      background-color:blue;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .royalblue{
      background-color:royalblue;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .skyblue{
      background-color:skyblue;
      height: 1px;
      width:10px;
      padding: 5px;
      border-radius:500px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .seagreen{
      background-color:seagreen;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .olivedrab{
      background-color:olivedrab;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .green{
      background-color:green;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-right: 17.875px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  .black{
      background-color:black;
      height: 1px;
      width:10px;
      padding: 5px;
      margin-left: 17.875px;
      border-radius:500px;
      -moz-border-radius:500px;
      -webkit-border-radius:500px;
      -moz-box-shadow: 2px 2px 3px #999;
      -webkit-box-shadow: 2px 2px 3px #999;
      float: left;
      }
  #containban{
      width: 100%;
      background-color: rgba(51,51,51,.8);
      padding-top: 5px;
      padding-bottom: 5px;
      margin-right: auto;
      margin-left: auto;
      } 
  #container{
      height: 100px;
      width: 915px;
      background-color: transparent;
      position: relative;
      margin-right: auto;
      margin-left: auto;
  }   
  .menu{
      height: 100px;
      width: 150px;
      background-color: rgba(204,0,51,1);
      float: left;
      transition: all .5s ease-in-out 0s;
      text-decoration: none;
      margin-right: 5px;
      text-align: center;
      -moz-border-radius: 25px 0px 0px 25px;
      -webkit-border-radius: 25px 0px 0px 25px;
      border-radius: 25px 0px 0px 25px;
  }

  .menu1{
      height: 100px;
      width: 150px;
      background-color: rgba(0,102,51,1);
      float: left;
      transition: all .5s ease-in-out 0s;
      margin-right: 5px;
  }

  .menu2{
      height: 100px;
      width: 150px;
      background-color: rgba(0,102,153,1);
      float: left;
      transition: all .5s ease-in-out 0s;
      margin-right: 5px;
  }

  .menu3{
      height: 100px;
      width: 150px;
      background-color: rgba(255,102,51,1);
      float: left;
      transition: all .5s ease-in-out 0s;
      -moz-border-radius: 0px 25px 25px 0px;
      -webkit-border-radius: 0px 25px 25px 0px;
      border-radius: 0px 25px 25px 0px;
  }
  .p1{
      font-family: "Permanent Marker", cursive;
      font-size: 24px;
      color: rgba(228,228,228,1);
      font-weight: bold;
      position: relative;
      width: 100px;
      left: 7px;
      transition: all .2s ease-in-out 0s;
      text-align: center;
      text-shadow: 4px 4px 5px #000;
  }
  .p2{
      font-family: Verdana, Geneva, sans-serif;
      font-size: 10px;
      color: rgba(255,255,255,.5);
      position: relative;
      top: 0px;
      left: 10px;
      transition: all .2s ease-in-out 0s;
      text-align: left;
      padding-left: 8px;
  }
  .menu:hover{
  width:450px;
  }
  .menu1:hover{
  width:450px;
  }
  .menu2:hover{
  width:450px;
  }
  .menu3:hover{
  width:450px;
  }

  .menu:hover .p1{
  color:rgba(255,255,255,1);
  }
  .menu:hover .p2{
  color:rgba(255,255,255,1);
  }

  .menu1:hover .p1{
  color:rgba(255,255,255,1);
  }
  .menu1:hover .p2{
  color:rgba(255,255,255,1);
  }

  .menu2:hover .p1{
  color:rgba(255,255,255,1);
  }
  .menu2:hover .p2{
  color:rgba(255,255,255,1);
  }

  .menu3:hover .p1{
  color:rgba(255,255,255,1);
  }
  .menu3:hover .p2{
  color:rgba(255,255,255,1);
  }
  .bold {
      font-weight: bold;
      font-size: 18px;
  }
  .funtext {
      font-size: 16px;
      color: rgba(212,38,81,1);
      font-weight: bold;
  }
  .centre {
      text-align: center;
      font-weight: bold;
  }
  .bluetext {
      color: rgba(0,102,153,1);
      font-size: 24px;
      font-weight: bold;
  }

0 个答案:

没有答案