停止滚动 html 中的最后一个图像
我有以下 html-
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
.style1 {
width: 2454px;
}
</style>
</head>
<body>
<table width="5964" border="0" cellspacing="13">
<tr>
<td width="3484"><img src="images/square.jpg" width="850" height="534" /
<img src="images/circle.jpg" width="850" height="534" /></td>
<td class="style1"><img src="images/rectangle.png" width="1134" height="534" /></td>
</tr>
</table>
</body>
当我在 IE 中查看此页面时,水平滚动条超出了应有的范围,而我需要它停在最后一个图像 rectangle.png
上。
我尝试更改 CSS,将列宽设置为自动,但这不起作用,表格宽度也不起作用。我该如何解决这个问题?
I have the following html-
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
.style1 {
width: 2454px;
}
</style>
</head>
<body>
<table width="5964" border="0" cellspacing="13">
<tr>
<td width="3484"><img src="images/square.jpg" width="850" height="534" /
<img src="images/circle.jpg" width="850" height="534" /></td>
<td class="style1"><img src="images/rectangle.png" width="1134" height="534" /></td>
</tr>
</table>
</body>
When I view this page in IE the horizontal scrollbar goes much further than it should, whereas I need it to stop on the last image rectangle.png
.
I have tried to alter the CSS making the column width set to auto but this did not work, and also the table width. How can I get round this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
第一列的宽度为 3484px,矩形图像的宽度为 1134px。因此,即使您更改 CSS 中的宽度,最小也将是 4618px。 (大约是我当前屏幕宽度的 4 倍)。
Your first column have a width of 3484px and your rectangle image have a width of 1134px. So at minimun it will be 4618px even if you change the width in the CSS. ( about 4 times the width of my current screen).
试试这个,看看它是否对您有帮助,如果您的内容包含在屏幕中,它应该有助于滚动。我过去用这种方法解决了同样的问题。希望它能帮助好运。
Try this and see if it helps you if you have your content contained within the screen it should help with scrolling. I have solved the same problem in the past this way. Hope it helps good luck.