jQuery를 사용하여 브라우저보기 포트에 맞게 div 크기를 조정하려고합니다. Chrome, Firefox 및 IE에서 올바른 크기가되도록 할 수 있습니다. 그러나 테두리 이미지는 어떤 이유로 Chrome에만 표시됩니다.jQuery로 테두리 이미지의 크기를 변경합니까?
이 내가 CSS에있는 것입니다 :
div.header, div.sidebar, div.content {
border-width: 10px;
-webkit-border-image: url(images/borderimage.gif) 10 10 10 10 stretch stretch;
-moz-border-image: url(images/borderimage.gif) 10 10 10 10 stretch stretch;
border-image: url(images/borderimage.gif) 10 10 10 10 stretch stretch;
}
그리고 이것이 내가 스크립트 지혜가 무엇 : (서식있는 숫자가 차감되는)
$("#over").css("height", document.documentElement.clientHeight+"px");
$("#over").css("width", document.documentElement.clientWidth+"px");
var overinner = $("div.overallinner");
$(".header").css("width", overinner.innerWidth()+"px");
$(".content").css("width", (overinner.innerWidth()-290)+"px");
var headr = $("div.header");
$("#head").css("width", headr.innerWidth()-5+"px");
$("#head").css("height", headr.innerHeight()-5+"px");
var sideb = $("div.sidebar");
$("#side").css("width", sideb.innerWidth()-5+"px");
$("#side").css("height", sideb.innerHeight()-5+"px");
var contn = $("div.content");
$("#cont").css("width", contn.innerWidth()-10+"px");
$("#cont").css("height", contn.innerHeight()-+"px");
어떤 아이디어?
(1) 페이지가 처음로드 될 때 (브라우저 크기가 조정될 때) jQuery 코드가 실행됩니까? (2) 브라우저 크기를 조정하기 전에 Chrome, Firefox 및 IE에서 테두리 이미지가 올바르게 표시됩니까? –
jQuery 스크립트는 머리에 넣을 때 작동하지 않지만 몸체 끝에서 실행하면 작동하고 이미지 테두리는 IE 나 Firefox에서는 작동하지 않고 크기 조정 전후에 작동합니다. 크롬. – WingManEXE