【问题标题】:HTML code only works fine on ChromeHTML 代码只能在 Chrome 上正常运行
【发布时间】:2017-04-07 17:48:43
【问题描述】:

我的 HTML 代码只能在 Chrome 上正常工作(我使用它构建它),当我尝试用任何其他浏览器(IE、Edge、Firefox)打开它时,它似乎不同,图像的大小不一样,由于文本的大小,视频显示错误且无法播放,对齐方式如此错误,通常整个页面看起来很糟糕!我不使用任何 CSS,所以我实际上找不到问题所在! 此外,很奇怪的是,当 Chrome 尚未运行(没有打开任何选项卡)并且我打开我的网站时,它看起来并不完全正确,就像所有内容都被缩放了,甚至是 Chrome 中的按钮和菜单。 怎么了?我能做什么?

<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<link rel="icon" type="image/png" href="icon.png"/>
<meta charset="UTF-8">
</head>
<body background="bg.png" link="white">
<img src="Banner.png">
<table align="center" valign="top" bgcolor="rgb(0,0,51)" style="width:100%">
<tr>
<th><font size=6 color="rgb(0,0,51)"><a href="chronology.html" style="text-decoration: none">~text~</a></font></th>
<th><font size=6 color="rgb(0,0,51)"><a href="rating & rules.html" style="text-decoration: none">~text</a></font></th>
<th><font size=6 color="rgb(0,0,51)"><a href="techniques.html" style="text-decoration: none">~text</a></font></th>
<th><font size=6 color="rgb(0,0,51)"><a href="greekathletes.html" style="text-decoration: none">~text~</a></font></th>
<th><font size=6 color="rgb(0,0,51)"><a href="contact.html" style="text-decoration: none">~text~</a></font></th>
</tr>
</table>
<img src="left1.png" align="left">
<img src="right1.png" align="right">
<br><br>
<h1 align="center">~text~</h1>
<div align="center">
<video src="Κρίκοι - Εισαγωγή.mp4" width="1000" height="600" controls autoplay>
</div>
<br><br><br>
<p align="center"><font size="4">
~~text~~
</p>
<p align="center">
~~text~~
</p>
</font>
<img src="1.jpg" hspace="200" vspace="20">
<img src="2.png" vspace="20">
<img src="3.jpg" hspace="290" vspace="30">
</body>
</html>

【问题讨论】:

  • 我们应该猜测您的代码吗?我的水晶球在商店里,所以如果您可以在您的问题中添加minimal reproducible example,将会很有帮助。
  • 是的,你是对的,我只是添加了它,用“~~text~~”替换了真实的文本。

标签: html google-chrome web


【解决方案1】:

浏览器之间仅与 W3C 规范相关联,并且大量使用 HTML5 中不可用的 &lt;font&gt; 标签将导致它们到处都是,并且可能几乎不支持尘土飞扬的旧标签,没有一个人不再使用了。

如果不学习 HTML 和 CSS,几乎不可能开发出好的网页。 CSS 是您设置排版的地方。

拿一本好的入门书开始学习。 HTML 和基本 CSS 都有相当容易的入口。但是,如果您不进行一些培训和结构,这将是一种挫败感。

【讨论】:

    猜你喜欢
    • 2022-07-08
    • 2017-01-28
    • 2013-10-09
    • 2014-01-16
    • 2019-09-23
    • 2019-03-10
    • 1970-01-01
    • 2017-07-20
    • 2020-09-16
    相关资源
    最近更新 更多