结果不一致 - 为什么? [英] Inconsistent results - why?

查看:76
本文介绍了结果不一致 - 为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< SWM.HTM上市;不起作用;定位错误(在主GIF下面)>

<! - 当访问该区域时,IE在左上角附近添加一个水平的4个图标条

角(WTF) ?) - >

< head>

< meta http-equiv =" Content-Type"含量=" text / html的; charset = iso-8859-1">

< title>脱衣舞井和生产< / title>

< / head>

< SCRIPT LANGUAGE =" JavaScript">

<! -

if(document.images){

var onef = new Image();

onef.src =" om2.gif";

var oneo = new Image();

oneo.src =" om22.gif";

}


function act(imgName){

if (document.images)

document [imgName] .src = eval(imgName +" o.src");

}


函数inact(imgName){

if(document.images)

document [imgName] .src = eval(imgName +" f.src");

}

// - >

< / SCRIPT>


<身体中心

style =" position:居中;身高:431px;宽度:760px; >

< img SRC =" Usa52.gif"高度= QUOT; 431"宽度= QUOT; 760" BORDER =" 0" ALT =" USA map"

< / BODY>


< div style =" position;绝对;上:55px;左:257px;

< img style =""边界=" 0" ALT =英寸×" >

< A onMouseOver =" act(''one'')"

onMouseOut =" inact(''one'')" />

< IMG SRC =" om2.gif" NAME ="一个" BORDER =" 0" ALT =黑色X>< / A>


< /SWM.HTM列表>

*******


< OMX.HTM上市;工作与定位是正确的>

<! - 当访问该区域时,IE在左上角附近添加一个水平的4个图标条

角(WTF?) - > ;


< head>

< meta http-equiv =" Content-Type"含量=" text / html的; charset = iso-8859-1">

< title> HTML onmouse over information and help< / title>

< / head>


< SCRIPT LANGUAGE =" JavaScript">

<! -

if(document.images){

var onef = new Image();

onef.src =" om2.gif";

var oneo = new Image();

oneo.src =" om22.gif";

}


function act(imgName){

if(document.images)

document [imgName] .src = eval(imgName +" o.src");

}

函数inact(imgName){

if(document.images)

document [imgName] .src = eval(imgName +" f.src" );

}

// - >

< / SCRIPT>


< body居住

style =" position:居中;身高:431px;宽度:760px; >

< img SRC =" Usa52.gif"高度= QUOT; 431"宽度= QUOT; 760" BORDER =" 0" ALT =" USA map"

< / BODY>


< div style =" position:absolute;上:120px;左:220px;

< img style ="" BORDER =" 0" ALT =英寸×" >

< A onMouseOver =" act(''one'')"

onMouseOut =" inact(''one'')"> ;

< IMG SRC =" om2.gif" NAME ="一个" BORDER =" 0" ALT =黑色X>< / A>

< /OMX.HTM列表>

解决方案

Robert Baer在2006年4月10日上午9:36 AEST:

< SWM.HTM listing;不起作用;定位错误(在主GIF下面)>
<! - 当访问该区域时,IE在左上角附近添加一个水平的4个图标条(WTF?) - >


我猜这是IE的图像工具栏。您可以在以下位置关闭/打开它:


工具 - >互联网选项 - >高级 - >多媒体 - >启用图像工具栏


这里有问题吗?如果你想知道为什么你的页面表现奇怪,你需要从有效的HTML开始。你有无效的

属性和body元素之外的元素。各种各样的浏览器

用它可能会有所不同(或者可能没有)。


这是跳舞熊综合症:不知道它有多好熊跳舞,但它完全跳舞了。 :-)


< head>
< meta http-equiv =" Content-Type"含量=" text / html的; charset = iso-8859-1">
< title>脱衣舞井和生产< / title>
< / head>

< SCRIPT LANGUAGE ="的JavaScript">


不推荐使用language属性,类型是必需的。

<! -


永远不要使用HTML脚本元素中的注释。


if(document.images){
var onef = new Image();
onef.src =" om2.gif" ;
var oneo = new Image();
oneo.src =" om22.gif";
}

function act(imgName){
if(document.images)
document [imgName] .src = eval(imgName +" o.src");


这里使用eval是完全没必要的:


document [imgName] .src = imgName +" o.src" ;; <函数inact(imgName){
if(document.images)
document [imgName] .src = eval(imgName) +" f.src");


document [imgName] .src = imgName +" f.src";


}
// - > ;
< / SCRIPT>

<以身体为中心


HTML 4中没有''居中''属性。

style =" position:居于;身高:431px;宽度:760px; >
< img SRC =" Usa52.gif"高度= QUOT; 431"宽度= QUOT; 760" BORDER =" 0" ALT =USA map>
< / BODY>


这里您的body元素已关闭,不允许进一步的HTML元素,

所有可以遵循的是结束< / HTML>标签。


< div style =" position;绝对;上:55px;左:257px;
< img style =""边界=" 0" ALT =英寸×" >
< A onMouseOver =" act(''one'')"
onMouseOut =" inact(''one'')" />


这是某种伪XHTML吗?一个A元素不能为空(即它必须有一个标记对),不要使用XHTML标记关闭 - 删除''/''。


< IMG SRC =" om2.gif" NAME ="一个" BORDER =" 0" ALT =黑色X>< / A>




为什么不将鼠标悬停在图像上?


< img src =''om2.gif''onmouseover =" this.src =''om22.gif'';"

onmouseout =" this.src ='' om2.gif '';" ...>

现在经常使用CSS进行鼠标悬停,因为它比预先加载图像更有效。如果你的文件很小而且只有两张图片,那么预加载似乎毫无意义。

[...]

-

Rob

小组常见问题:<网址:http://www.jibbering.com/FAQ>


RobG写道:

Robert Baer于2​​006年4月10日上午9:36说AEST:

< SWM.HTM listing;不起作用;定位错误(在主GIF下面)>
<! - 当访问该区域时,IE在左上角附近添加一个水平的4个图标条(WTF?) - >

我猜这是IE的图像工具栏。您可以在以下位置关闭/打开它:

工具 - >互联网选项 - >高级 - >多媒体 - >启用图像工具栏



* **哦;谢谢。

这里有问题吗?如果您想知道您的页面行为奇怪,那么您需要从有效的HTML开始。您在body元素外部具有无效的
属性和元素。各种浏览器用它做什么可能会有所不同(或者可能不同)。
**好吧,对或错,第一个不起作用,第二个没有用,b $ b确实没有什么意义上的区别。

这就是问题。

然而,修复是非常有帮助的。

无效的属性和元素:我没有线索在哪里或什么

应该是。

这是跳舞熊综合症:不知道熊跳得多好,但它总是跳舞。 :-)

< head>
< meta http-equiv =" Content-Type"含量=" text / html的; charset = iso-8859-1">
< title>脱衣舞井和生产< / title>
< / head>

< SCRIPT LANGUAGE =" JavaScript">

不推荐使用language属性,类型是必需的。



**如果我离开< meta ...排除,没有看到差异;两个

HTML编程的工作方式仍然不同。

使用IE或NS的区别相同。

< ;! -

永远不要在脚本元素中使用HTML注释。



**我刚刚复制了我看到的其他内容..

if(document.images){
var onef = new Image();
onef.src =" om2.gif";
var oneo = new Image() ;
oneo.src =" om22.gif";
}

函数行为(imgName){
if(document.images)
文件[imgName] .src = eval(imgName +" o.src");

在这里使用eval是完全没必要的:



**再次,我刚刚复制了我看到的其他内容..

文件[imgName] .src = imgName +" o.src" ;;

函数inact(imgName){
if(document.images)
document [imgName] .src = eval(imgName +" f.src");

document [imgName] .src = imgName +" f .src" ;;

}
// - >
< / SCRIPT>

<以身体为中心



HTML 4中没有''居中''属性。



**也许,但我已经看到了它和它适用于IE和NS。

但是我可以使用绝对位置并用手计算正确的点。

style =" position:居中;身高:431px;宽度:760px; >
< img SRC =" Usa52.gif"高度= QUOT; 431"宽度= QUOT; 760" BORDER =" 0" ALT =" USA map"
< / BODY>

这里你的body元素已关闭,不允许进一步的HTML元素,
所有可以遵循的是关闭< / HTML>标签。

< div style =" position;绝对;上:55px;左:257px;
< img style =""边界=" 0" ALT =英寸×" >
< A onMouseOver =" act(''one'')"
onMouseOut =" inact(''one'')" />



这是某种伪XHTML吗?一个A元素不能为空(即它必须有一个标签对),不要使用XHTML标签关闭 - 删除''/''。



**意味着是HTML;将根据你的建议进行修复。

< IMG SRC =" om2.gif" NAME ="一个" BORDER =" 0" ALT =黑色X>< / A>

为什么不将鼠标悬停在图像上?

< img src =''om2.gif ''onmouseover =" this.src =''om22.gif'';"
onmouseout =" this.src =''om2.gif'';" ...>

现在经常使用CSS进行鼠标移动,因为它比预加载图像更有效,调查一下。如果您的文档很小并且只有两个图像,预加载似乎毫无意义。



** CSS?那是什么?我宁愿亲吻,因为我知道

这么少。

该应用程序将有相当数量的大尺寸图像。


[...]



Robert Baer在2006年4月10日上午11:48 AEST:< blockquote class =post_quotes> RobG写道:

Robert Baer于2​​006年4月10日上午9:36说道AEST:

< ; SWM.HTM上市;不起作用;定位错误(在主GIF下面)>
<! - 当访问该区域时,IE在左上角附近添加一个水平的4个图标条(WTF?) - >

我猜这是IE的图像工具栏。您可以在以下位置关闭/打开它:

工具 - >互联网选项 - >高级 - >多媒体 - >启用图像工具栏



* **哦;谢谢。


这里有问题吗?如果您想知道您的页面行为奇怪,那么您需要从有效的HTML开始。您在body元素外部具有无效的
属性和元素。各种各样的浏览器使用它可能会有所不同(或者可能不同)。



**嗯,对或错,第一个不起作用,第二个一个
确实没有什么意义上的区别。




有,它是开头A标签末尾的''/''第一个

(非工作)版本。你的HTML是''标签汤'',也就是说,浏览器

还没有给出DOCTYPE,所以它必须猜测如何解释

标记。它还会遇到各种无效的属性和标记,

所以它将使用''quirksmode'',只要浏览器是/ b $ b完全混淆了什么,它就会被使用标记应该做,并且它最好显示一些东西。


这就是问题所在。


有人回答了 - 你的糟糕标记就是问题所在。你可以在这里验证

加价:


< URL:http://validator.w3.org/>

继续努力,直到你得到这份文件有效......。

每次都会出现前几个错误,通常它们会导致其他地方出现级联错误,当你修复第一个错误时会消失。

当您获得有效文档时,您将学到很多关于

HTML的知识。当你解决这个问题时,还有一个CSS验证器。


但是,修复是非常有用的。
无效的属性和元素:我没有线索在哪里或什么应该是什么。


使用W3C验证器和HTML规范。

这是跳舞熊综合症:不知道熊跳得多好,但它总是跳舞。 :-)

< head>
< meta http-equiv =" Content-Type" content =" text / html;
charset = iso-8859-1">
< title>脱衣舞井和生产< / title>
< / head>

< SCRIPT LANGUAGE =" JavaScript">



不推荐使用language属性,类型是必需的。



**如果我离开< meta ...排除,没有看到差异;这两个



正如你所发现的,元标记在这里是无关紧要的。它的目的是

主要用于验证和后备,如果服务器无法设置

内容类型(服务器应该始终设置它)。


HTML编程的工作方式仍然不同。
使用IE或NS的区别相同。


因为你的标记是如此充满错误,无论各种浏览器可能与它有什么不同。你发布的两个例子在

中有不同的错误。


IE和Netscape Navigator之外还有很多浏览器。


[...]


HTML 4中没有''居中''属性。



**也许,但我已经看过了它,它适用于IE和NS。
但我可以使用绝对位置和手计算正确的点。




没有要求这样做。你不知道窗户的宽度是多少,你不需要知道。了解有关HTML和CSS的更多信息,在相关的新组中询问此类

问题。但在此之前,搜索他们的

档案并查找提出同样问题的其他帖子。


HTML:

新闻: comp.infosystems。 www.authoring.html


CSS:

comp.infosystems。 www.authoring.stylesheets

有些读者对新手不是很宽容,无论如何都要坚持。

[...]

鼠标移动现在经常使用CSS,因为它比预加载图像更有效,调查一下。如果您的文档很小并且只有两个图像,预加载似乎毫无意义。



** CSS?那是什么?我宁愿亲吻,因为我知道
这么少。




小心你亲吻的东西,它可能会咬人:-)


该应用程序将有相当数量的大尺寸图像。




下面是我所指的一个例子,它可能不合适

给你。 CSS小组的后续行动:


< URL:http://wellstyled.com/css-nopreload-rollovers.html>

滥用这种方式只需要一个元素,因为IE不支持b $ b支持悬停在其他元素上 - 但是我认为这会改变IE 7。


Poke在alistapart周围,大部分都很不错。


< UR:http://www.alistapart.com/>

这里有一个简介,有效的,带有保持居中的图像的文档

无论浏览器窗口的大小是多少(前提是有空间

课程):

<!DOCTYPE HTML PUBLIC" - // W3C // DTD HTML 4.01 // EN"

" http://www.w3.org/TR/html4/strict。 dtd">

< html>

< head>

< title>中心图片< / title>

< meta http-equiv =" Content-Type"

content =" text / html; charset = ISO-8859-1">


< style type =" text / css">

#centerImage {text-align:中心;}

< / style>


< / head>

< body>

< div id =" centerImage">< img src =" a.gif" alt ="">< / div>

< / body>

< / html>


-

Rob

小组常见问题:<网址:http://www.jibbering.com/FAQ>

<SWM.HTM listing; does not work; positioning wrong (below main GIF)>
<!-- IE adds a horizontal 4-icon strip near the upper left
corner when that area is visited (WTF?) -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Stripper wells and production</title>
</head>

<SCRIPT LANGUAGE="JavaScript">
<!--
if (document.images) {
var onef = new Image();
onef.src = "om2.gif";
var oneo = new Image();
oneo.src = "om22.gif";
}

function act(imgName) {
if (document.images)
document[imgName].src = eval(imgName + "o.src");
}

function inact(imgName) {
if (document.images)
document[imgName].src = eval(imgName + "f.src");
}
// -->
</SCRIPT>

<body centered
style="position: centered; height: 431px; width: 760px;" >
<img SRC="Usa52.gif" height="431" width="760" BORDER="0" ALT="USA map">
</BODY>

<div style="position; absolute; top: 55px; left: 257px; "
<img style = "" border="0" alt="X" >
<A onMouseOver="act(''one'')"
onMouseOut="inact(''one'')" />
<IMG SRC="om2.gif" NAME="one" BORDER="0" ALT="black X"></A>

</SWM.HTM listing>
*******

<OMX.HTM listing; works & positioning is correct>
<!-- IE adds a horizontal 4-icon strip near the upper left
corner when that area is visited (WTF?) -->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>HTML onmouse over information and help</title>
</head>

<SCRIPT LANGUAGE="JavaScript">
<!--
if (document.images) {
var onef = new Image();
onef.src = "om2.gif";
var oneo = new Image();
oneo.src = "om22.gif";
}

function act(imgName) {
if (document.images)
document[imgName].src = eval(imgName + "o.src");
}

function inact(imgName) {
if (document.images)
document[imgName].src = eval(imgName + "f.src");
}
// -->
</SCRIPT>

<body centered
style="position: centered; height: 431px; width: 760px;" >
<img SRC="Usa52.gif" height="431" width="760" BORDER="0" ALT="USA map">
</BODY>

<div style="position: absolute; top: 120px; left: 220px; "
<img style = "" BORDER="0" ALT="X" >
<A onMouseOver="act(''one'')"
onMouseOut="inact(''one'')">
<IMG SRC="om2.gif" NAME="one" BORDER="0" ALT="black X"></A>

</OMX.HTM listing>

解决方案

Robert Baer said on 10/04/2006 9:36 AM AEST:

<SWM.HTM listing; does not work; positioning wrong (below main GIF)>
<!-- IE adds a horizontal 4-icon strip near the upper left
corner when that area is visited (WTF?) -->
I guess that is IE''s image toolbar. You can turn it off/on in:

Tools->Internet options->Advanced->Multimedia->Enable image toolbar

Is there a question here? If you wondering why your page behaves
strangely, you need to start with valid HTML. You have invalid
attributes and elements outside the body element. What various browsers
do with it will likely be different (or maybe not).

It''s the dancing bear syndrome: wonder not how well the bear dances, but
that it dances at all. :-)

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Stripper wells and production</title>
</head>

<SCRIPT LANGUAGE="JavaScript">
The language attribute is deprecated, type is required.
<!--
Never use HTML comments inside script elements.

if (document.images) {
var onef = new Image();
onef.src = "om2.gif";
var oneo = new Image();
oneo.src = "om22.gif";
}

function act(imgName) {
if (document.images)
document[imgName].src = eval(imgName + "o.src");
The use of eval here is totally unnecessary:

document[imgName].src = imgName + "o.src";

}

function inact(imgName) {
if (document.images)
document[imgName].src = eval(imgName + "f.src");
document[imgName].src = imgName + "f.src";

}
// -->
</SCRIPT>

<body centered
There is no ''centered'' attribute in HTML 4.
style="position: centered; height: 431px; width: 760px;" >
<img SRC="Usa52.gif" height="431" width="760" BORDER="0" ALT="USA map">
</BODY>
Here your body element is closed, no further HTML elements are allowed,
all that can follow is a closing </HTML> tag.

<div style="position; absolute; top: 55px; left: 257px; "
<img style = "" border="0" alt="X" >
<A onMouseOver="act(''one'')"
onMouseOut="inact(''one'')" />
Is this some kind of pseudo XHTML? An A element can''t be empty (i.e. it
must have a tag pair), don''t use an XHTML tag closure - remove the ''/''.

<IMG SRC="om2.gif" NAME="one" BORDER="0" ALT="black X"></A>



Why not put the mouseover on the image itself?

<img src=''om2.gif'' onmouseover="this.src=''om22.gif'';"
onmouseout="this.src=''om2.gif'';" ... >
Mouseovers are frequently done with CSS now as it''s more efficient than
pre-loading images, investigate that. If your document is small and
only has two images, pre-loading seems pointless.
[...]
--
Rob
Group FAQ: <URL:http://www.jibbering.com/FAQ>


RobG wrote:

Robert Baer said on 10/04/2006 9:36 AM AEST:

<SWM.HTM listing; does not work; positioning wrong (below main GIF)>
<!-- IE adds a horizontal 4-icon strip near the upper left
corner when that area is visited (WTF?) -->

I guess that is IE''s image toolbar. You can turn it off/on in:

Tools->Internet options->Advanced->Multimedia->Enable image toolbar


*** Oh; thanks.

Is there a question here? If you wondering why your page behaves
strangely, you need to start with valid HTML. You have invalid
attributes and elements outside the body element. What various browsers
do with it will likely be different (or maybe not). ** Well, right or wrong, the first one does not work, and the second one
does and ther is no meaningful difference.
That is the question.
However, making fixed is very helpful.
"invalid attributes and elements": i do not have a clue where or what
should be.

It''s the dancing bear syndrome: wonder not how well the bear dances, but
that it dances at all. :-)

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Stripper wells and production</title>
</head>

<SCRIPT LANGUAGE="JavaScript">

The language attribute is deprecated, type is required.


** If i leave the "<meta ..." line out, no difference is seen; the two
HTML progs still work differently.
Same difference whether IE or NS is used.

<!--

Never use HTML comments inside script elements.


** I just copied what i saw elsewhwere..

if (document.images) {
var onef = new Image();
onef.src = "om2.gif";
var oneo = new Image();
oneo.src = "om22.gif";
}

function act(imgName) {
if (document.images)
document[imgName].src = eval(imgName + "o.src");

The use of eval here is totally unnecessary:


** Again, I just copied what i saw elsewhwere..

document[imgName].src = imgName + "o.src";

}

function inact(imgName) {
if (document.images)
document[imgName].src = eval(imgName + "f.src");

document[imgName].src = imgName + "f.src";

}
// -->
</SCRIPT>

<body centered


There is no ''centered'' attribute in HTML 4.


** Maybe, but i have seen it and it works for IE and NS.
But i could use absolute position and hand calculate the proper point.

style="position: centered; height: 431px; width: 760px;" >
<img SRC="Usa52.gif" height="431" width="760" BORDER="0" ALT="USA map">
</BODY>

Here your body element is closed, no further HTML elements are allowed,
all that can follow is a closing </HTML> tag.

<div style="position; absolute; top: 55px; left: 257px; "
<img style = "" border="0" alt="X" >
<A onMouseOver="act(''one'')"
onMouseOut="inact(''one'')" />


Is this some kind of pseudo XHTML? An A element can''t be empty (i.e. it
must have a tag pair), don''t use an XHTML tag closure - remove the ''/''.


** Meant to be HTML; will make fixes as you suggest.

<IMG SRC="om2.gif" NAME="one" BORDER="0" ALT="black X"></A>

Why not put the mouseover on the image itself?

<img src=''om2.gif'' onmouseover="this.src=''om22.gif'';"
onmouseout="this.src=''om2.gif'';" ... >
Mouseovers are frequently done with CSS now as it''s more efficient than
pre-loading images, investigate that. If your document is small and
only has two images, pre-loading seems pointless.


** CSS? what is that? would rather kiss as much as possible, as i know
so little.
And the app will have a fair number of good-sized images.


[...]



Robert Baer said on 10/04/2006 11:48 AM AEST:

RobG wrote:

Robert Baer said on 10/04/2006 9:36 AM AEST:

<SWM.HTM listing; does not work; positioning wrong (below main GIF)>
<!-- IE adds a horizontal 4-icon strip near the upper left
corner when that area is visited (WTF?) -->
I guess that is IE''s image toolbar. You can turn it off/on in:

Tools->Internet options->Advanced->Multimedia->Enable image toolbar



*** Oh; thanks.


Is there a question here? If you wondering why your page behaves
strangely, you need to start with valid HTML. You have invalid
attributes and elements outside the body element. What various
browsers do with it will likely be different (or maybe not).



** Well, right or wrong, the first one does not work, and the second one
does and ther is no meaningful difference.



There is, it is the ''/'' at the end of the opening A tag in the first
(non-working) version. Your HTML is ''tag soup'', that is, the browser
has not been given a DOCTYPE so it must guess how to interpret the
markup. It also encounters a variety of invalid attributes and markup,
so it will use ''quirksmode'', which is used whenever the browser is
utterly confused as to what the markup is supposed to do and does its
best to display something.

That is the question.
It was answered - your awful markup was the issue. You can validate
markup here:

<URL:http://validator.w3.org/>
Keep working at it until you get "This document is valid...". Work on
the first couple of errors each time, often they will cause cascading
errors elsewhere that go away when you fix the first ones.

By the time you get a valid document you will have learned a lot about
HTML. There is also a CSS validator when you get around to that.

However, making fixed is very helpful.
"invalid attributes and elements": i do not have a clue where or what
should be.
Use the W3C validator and HTML specification.

It''s the dancing bear syndrome: wonder not how well the bear dances,
but that it dances at all. :-)

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title>Stripper wells and production</title>
</head>

<SCRIPT LANGUAGE="JavaScript">



The language attribute is deprecated, type is required.



** If i leave the "<meta ..." line out, no difference is seen; the two



The meta tag is irrelevant here, as you''ve discovered. It''s purpose is
largely for validation and fallback if the server fails to set the
content type (the server should always set it).

HTML progs still work differently.
Same difference whether IE or NS is used.
Because your markup is so full of errors that whatever various browsers
may make of it is likely different. And there are different errors in
the two examples you posted.

There are lots of browsers other than IE and Netscape Navigator.

[...]


There is no ''centered'' attribute in HTML 4.



** Maybe, but i have seen it and it works for IE and NS.
But i could use absolute position and hand calculate the proper point.



There is no requirement to do that. You don''t know how wide the window
is and you don''t need to know. Learn more about HTML and CSS, ask such
questions in a relevant new group. But before you do, search their
archives and find other posts that ask the same question.

HTML:
news:comp.infosystems.www.authoring.html

CSS:
comp.infosystems.www.authoring.stylesheets
Some readers there aren''t very tolerant of newbies, persist anyway.
[...]

Mouseovers are frequently done with CSS now as it''s more efficient
than pre-loading images, investigate that. If your document is small
and only has two images, pre-loading seems pointless.



** CSS? what is that? would rather kiss as much as possible, as i know
so little.



Be careful what you kiss, it may bite :-)

And the app will have a fair number of good-sized images.



Below is an example of what I was referring to, it may not be suitable
for you. Follow-up in a CSS group:

<URL:http://wellstyled.com/css-nopreload-rollovers.html>
Abusing an A element this way is only necessary because IE doesn''t
support hover on other elements - but that will change with IE 7 I think.

Poke around alistapart, most of it is pretty good.

<UR:http://www.alistapart.com/>
Here is a brief, valid, document with an image that stays centered
regardless of what size the browser window is (provided there''s room of
course):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Center Image</title>
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">

<style type="text/css">
#centerImage {text-align: center;}
</style>

</head>
<body>
<div id="centerImage"><img src="a.gif" alt=""></div>
</body>
</html>

--
Rob
Group FAQ: <URL:http://www.jibbering.com/FAQ>


这篇关于结果不一致 - 为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆