码迷,mamicode.com
首页 > 其他好文 > 详细

商品展示 初学者

时间:2018-02-20 19:42:01      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:order   tle   title   hid   function   src   meta   初学者   gre   

<!DOCTYPE html>
<html>
 <head>
  <meta charset="utf-8" />
  <title></title>
  <style type="text/css">
   *{
    margin: 0;
    padding: 0;
   }
   .box{
    width: 520px;
    height: 600px;
    margin: 0 auto;
   }
   .big{
    width:520px;
    height: 450px;
    border: dashed 1px grey;
    background: url(img/11.png);
   }
   .small{
    /*width: 600px;*/
    height: 150px;
    overflow: hidden;
   }
   .small li{
    float: left;
    list-style: none;
    border: solid 1px black;
   }
  </style>
  <script type="text/javascript">
   window.onload = function(){
    var obig = document.getElementById(‘big‘);
    function fn(liid,bg){
     var OS = document.getElementById(liid);
     OS.onmouseover = function(){
      
      obig.style.backgroundImage = bg;
     }
    }
    fn(‘li01‘,‘url(img/11.png)‘);
    fn(‘li02‘,‘url(img/3 (1).png)‘);
    fn(‘li03‘,‘url(img/4.png)‘);
    fn(‘li04‘,‘url(img/5.png)‘);
    
   }
  </script>
 </head>
 <body>
  <div class="box">
      <div class="big" id="big">
       
      </div>
      <div class="small">
       <ul>
        <li id="li01"><img src="img/11.png" /></li>
        <li id="li02"><img src="img/3 (1).png" /> </li>
        <li id="li03"><img src="img/4.png"/></li>
        <li id="li04"><img src="img/5.png" /> <li>
       </ul>
      </div>
  </div>
    </body>
</html>

商品展示 初学者

标签:order   tle   title   hid   function   src   meta   初学者   gre   

原文地址:https://www.cnblogs.com/verayangnakiss/p/8455661.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!