css中if使用執行個體

來源:互聯網
上載者:User

個滾動代碼,其他瀏覽器都滾的好好的,就IE出現錯誤!氣憤!隨想起IE的條件陳述式,如果是IE用第一種滾動方式,如果是其他瀏覽器用另外一種方式;

 
  1. <!--[if IE]> 
  2. <script type="text/javascript"> 
  3. new Marquee("ygjy1",0,2,395,300,50,0,0)   
  4. new Marquee("jbhc1",0,2,395,300,50,0,0)   
  5. </script> 
  6. <![endif]--> 

其他瀏覽器:

 
  1. <!--[if !IE]><!--> 
  2. <script type="text/javascript"> 
  3. new Marquee("ygjy1",0,3,395,303,20,4000,3000,101);  
  4. new Marquee("jbhc1",1,3,395,303,20,4000,3000,101);  
  5. </script> 
  6. <!--<![endif]-->  
相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.