0

I have created a simple - HelloWorld.html Webpage with HTML, JavaScript, CSS. When I run it from Eclipse IDE, It works perfectly on browser.

What it does is like: the page has 5 buttons, 
and hellow World is displayed from 5 different <div>'s  
that remains hidden and appears as inline after button click.

When I navigate to the work-space and try to open the HelloWorld.html file in browser manually, nothing comes correctly.

All properties: positions and bgcolors etc declared in external css file has no effect on browser.

I know it sounds stupid, but I'm just hating myself for this. Does anyone know why is it behaving in this way?

PS: 1. I have no Server-side scripting in the file. 2. HTML, JS, CSS are different file.

4

2 回答 2

2

我最好的猜测是您正在尝试使用具有真实路径的 css 文件,当您不像 eclipse IDE 那样临时托管它时,该路径会发生变化。

首先,打开开发人员工具栏 (f12) 并检查网络选项卡以查看是否正在加载 css 文件。

尝试改用绝对路径并查看它是否会改变任何内容。

于 2013-07-01T06:19:09.597 回答
0

在我的经验中。我已经多次看到这种问题,Eclipse的内置浏览器有时不支持所有功能,特别是当你做喜欢设计的时候。您可以使用 MS-IE 6 或更高版本。或者您可以尝试其他一些浏览器,例如:Mozilla、Chrome 等,因为它为开发人员提供了脚本、div、css 等功能。所以你可以和他们核实一下。

谢谢, 阿文德

于 2013-07-01T06:21:46.310 回答