因為我有放底圖...如果不能自己設定長寬看起來會怪怪的
如果可以設定的話...可以教一下嗎
可列印頁面
因為我有放底圖...如果不能自己設定長寬看起來會怪怪的
如果可以設定的話...可以教一下嗎
<iframe height=高度 width=寬度 src=網址></iframe>
[QUOTE][i]最初由 jmi 發表[/i]
[B]<iframe height=高度 width=寬度 src=網址></iframe> [/B][/QUOTE]
這裡不支援html語法
不然另外問個問題
要用什麼語法才能讓底圖自動放大到適合瀏灠器
這樣結果就和我想要的一樣了
這樣吧~
[QUOTE][i]最初由 jmi 發表[/i]
[B]這樣吧~ [/B][/QUOTE]
嗯...試了好久終於成功了
但能不能也教一下
把底圖自動放大到適合瀏灠器的大小
因為我自己網頁上也有放上這些圖
如果別人瀏灠器超過我底圖大小就會重覆出現
看起來很奇怪
[QUOTE][i]最初由 vvcvc 發表[/i]
[B]
嗯...試了好久終於成功了
但能不能也教一下
把底圖自動放大到適合瀏灠器的大小
因為我自己網頁上也有放上這些圖
如果別人瀏灠器超過我底圖大小就會重覆出現
看起來很奇怪 [/B][/QUOTE]
把這一段放到 <body> </body> 之間
[php]
<script>
function makeIm() {
NS4=(document.layers);
IE4=(document.all);
scaleWidth = true;
scaleHeight = true;
imSRC = "背景圖網址";
if (NS4) {
origWidth = innerWidth;
origHeight = innerHeight;}
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();}
if (NS4) onresize = reDo;
if (IE4) onresize = reDoIE;
function reDoIE(){
imBG.width = document.body.clientWidth;
imBG.height = document.body.clientHeight;}
winWid = (NS4) ? innerWidth : document.body.clientWidth;
winHgt = (NS4) ? innerHeight : document.body.clientHeight;
imStr = "<DIV ID=elBGim"
+ " STYLE='position:absolute;left:0;top:0;z-index:-1'>"
+ "<IMG NAME='imBG' BORDER=0 SRC="+imSRC;
if (scaleWidth) imStr += " WIDTH="+winWid;
imStr += "></DIV>";
document.write(imStr);}
makeIm();
</script>
[/php]
這是在 [url]http://dob.tnc.edu.tw/[/url] 找到的~
[QUOTE][i]最初由 jmi 發表[/i]
[B]
把這一段放到 <body> </body> 之間
[php]
<script>
function makeIm() {
NS4=(document.layers);
IE4=(document.all);
scaleWidth = true;
scaleHeight = true;
imSRC = "背景圖網址";
if (NS4) {
origWidth = innerWidth;
origHeight = innerHeight;}
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();}
if (NS4) onresize = reDo;
if (IE4) onresize = reDoIE;
function reDoIE(){
imBG.width = document.body.clientWidth;
imBG.height = document.body.clientHeight;}
winWid = (NS4) ? innerWidth : document.body.clientWidth;
winHgt = (NS4) ? innerHeight : document.body.clientHeight;
imStr = "<DIV ID=elBGim"
+ " STYLE='position:absolute;left:0;top:0;z-index:-1'>"
+ "<IMG NAME='imBG' BORDER=0 SRC="+imSRC;
if (scaleWidth) imStr += " WIDTH="+winWid;
imStr += "></DIV>";
document.write(imStr);}
makeIm();
</script>
[/php]
這是在 [url]http://dob.tnc.edu.tw/[/url] 找到的~ [/B][/QUOTE]
果然可以用...謝囉