//首页导航 $(function () { $(".mainlevel:has(div)").hover(function () { $(this).children("div").stop(true, true).slideDown(300) }, function () { $(this).children("div").stop(true, true).slideUp(1) }); $(".mainlevel li:has(div)").hover(function () { $(this).children("div").stop(true, true).slideDown(1) }, function () { $(this).children("div").stop(true, true).slideUp(1) }); }); window.onload=function(){ var type = navigator.userAgent.match(/.*Mobile.*/)?"phone":"pc"; if(type!="pc"){ $(".detailcontent").css({"width": "100%"}); $(".detailcontent img").css({"width": "100%"}); }else{ $(".detailcontent").css({"margin":"auto"}); $(".detailcontent img").css({"margin": "auto"}); //$(".detailcontent").css({"width":"700px"}); //$(".detailcontent img").css({"max-width": "700px"}); }}