$(function(){ $('.navbar-nav > li').hover(function(){ $(this).find('.dropdown-menu').slideDown() },function(){ $(this).find(".dropdown-menu").stop(true,false).slideUp(); }) //鍏堟墽琛屼竴娆″嚱鏁 changeMargin(); }) //鐩戝惉娴忚鍣ㄥ搴︾殑鏀瑰彉 window.onresize = function(){ changeMargin() } function changeMargin(){ var bodyW = $('body').width() // var div12 = bodyW*0.324 < 623 ? 623 : bodyW*0.324 // $('.product-12-2').height( div12 ) var div7 = bodyW*0.34 < 653 ? 653 : bodyW*0.34 // $('.product-7-3').height( div7 ) // var div11 = bodyW*0.4375 < 840 ? 840 : bodyW*0.4375 // $('.product-11-2').height( div11 ) // $('.product-11-2-bg').css('top', -bodyW * 0.1) $('.product-11-2-bg').css('top', '194px') // var div13 = bodyW*0.426 < 818 ? 818 : bodyW*0.426 // $('.product-13-5').height( div13 ) if ( bodyW < 992 ) { $('.banner').height( bodyW * 0.56 ) $('.product-13-3 .swiper-wrapper').removeClass('ys-flex-wrap-w') new Swiper('.product-13-3 .swiper-container', { loop : true, autoplay: { delay: 3000, stopOnLastSlide: false, disableOnInteraction: false, }, }) new Swiper('.product-13-4 .swiper-container', { loop : true, autoplay: { delay: 3000, stopOnLastSlide: false, disableOnInteraction: false, }, }) }else{ $('.banner').height( '100%' ) var slideW = $('.product-13-3 .swiper-wrapper .swiper-slide').width() $('.product-13-3 .swiper-wrapper').addClass('ys-flex-wrap-w') $('.product-13-3 .swiper-wrapper .swiper-slide').height( slideW*0.6166 ) // $('.section04 .list .index-news-0, .section04 .list .index-news-1').height( bodyW * 0.625 / 2 ) } if ( bodyW > 1920 ){ $('html').css('fontSize', '100px') }else if( bodyW > 992 ){ $('html').css('fontSize', bodyW/19.2+'px') }else{ } if ( bodyW < 1600 ){ //棣栭〉鍏徃绠€浠 $('.index-about .content').height( bodyW*0.5625 ) $('.index-about .content .text').css({ 'width': bodyW*0.456 +'px', 'height': bodyW*0.4875 +'px'}) //浜у搧鍒楄〃 $('.list-product').css('height', bodyW*0.51+'px') $('.list-product-main .scontent').each(function(){ var parentW = $(this).parent().width() var nameW = $(this).siblings('.name').outerWidth(true) $(this).width( parentW - nameW -5) }) }else{ $('.index-about .content').height( 900 ) $('.index-about .content .text').css({ 'width':'730px', 'height':'780px'}) $('.list-product').css('height', '820px') } //浜у搧鍒楄〃 $('.list-product-main .scontent').each(function(){ var parentW = $(this).parent().width() var nameW = $(this).siblings('.name').outerWidth(true) $(this).width( parentW - nameW -5) }) }