Line 213: | Line 213: | ||
$(window).scrollTo(300, 500); | $(window).scrollTo(300, 500); | ||
</script>--> | </script>--> | ||
− | + | ||
<div class="neiyebg"> | <div class="neiyebg"> | ||
<script> | <script> | ||
− | // | + | //调整内页背景图像尺寸至适合窗口 |
− | var l = $(window).width(); | + | var l = $(window).width(); //获取窗口尺寸 |
+ | //初始化尺寸 | ||
$(".neiyebg img").attr("width", l); | $(".neiyebg img").attr("width", l); | ||
$(".menu").css("width", l); | $(".menu").css("width", l); | ||
+ | //随Resize改变尺寸 | ||
$(window).resize(function () { | $(window).resize(function () { | ||
− | var l = $(window).width(); | + | //var l = $(window).width(); |
$(".neiyebg img").attr("width", l); | $(".neiyebg img").attr("width", l); | ||
$(".menu").css("width", l); | $(".menu").css("width", l); | ||
− | + | //窗口尺寸小于1200则切换为新导航模式 | |
if ($(window).width() < 1200) { | if ($(window).width() < 1200) { | ||
$(".menu > ul").css("display", "none"); | $(".menu > ul").css("display", "none"); | ||
Line 237: | Line 239: | ||
</div > | </div > | ||
− | + | ||
<script> | <script> | ||
$(document).ready(function () { | $(document).ready(function () { |
Revision as of 11:55, 12 October 2018