如何使图像适合桌子并相应地收缩或拉长?

编程入门 行业动态 更新时间:2024-10-08 00:34:19
本文介绍了如何使图像适合桌子并相应地收缩或拉长?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

<table cellspacing=0 cellpadding=0 border =1 > <td rowspan=4 VALIGN=bottom cellspacing=0 cellpadding=0> <img src="ironman_01.gif" style="width:95px;height:450px;" > </td> <td colspan=5 VALIGN=bottom> <img src=ironman_02.gif> </td> <tr> <td rowspan=2 VALIGN=top> <img src=ironman_04.gif> </td> <td VALIGN=bottom> <img src=ironman_05.gif> </td> <td> <img src=ironman_06.gif></td> <td > <img src=ironman_07.jpg> </t> <td rowspan=2> <img src=ironman_08.gif> </td> <td rowspan=2> <img src=ironman_11.jpg> </td> <td rowspan=3> <img src=ironman_12.gif> </td> <tr> <td VALIGN=top > <img src=ironman_09.jpg> </td> <td colspan=2 VALIGN=top> <img src=ironman_10.gif </td> <tr> <td VALIGN=top> <img src=ironman_13.jpg </td> <td colspan=2> <img src=ironman_14.gif </td> <td> <img src=ironman_15.jpg </td> <td> <img src=ironman_17.jpg </td> <td> <img src=ironman_16.gif </td> </table> </html>

推荐答案

这不是HTML渲染的工作方式.您应该尝试将表格和布局调整为图像的大小.无论如何,如果您明确指定(或修改JavaScript)<img>元素的属性width或height(或两者),则始终可以显示重新采样的图像,但是您需要注意匹配宽高比).
—SA
This is not how HTML rendering works. You should rather try to adjust your table and the layout to the size of the image. Anyway, you can always present your image re-sampled down if you explicitly specify (or modify it JavaScript) the attribute width or height of the <img> element (or both, but then you will need to take care to match the aspect ratio).
—SA

更多推荐

如何使图像适合桌子并相应地收缩或拉长?

本文发布于:2023-11-11 08:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577899.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:桌子   图像   适合

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!