图像放置不正确 [英] Image is not placed properly

查看:97
本文介绍了图像放置不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的网页中,我有一个Div部分,高度为302PX,宽度为302PX.

在另一页中,我有一个文件上传"控件.当我们上传图像时,该图像将显示在该Div部分中.

1.当图像较大时,应重新调整大小并完全显示在该特定的Div部分中.

例如:图像大小如350PX * 350PX和1024PX * 1024PX,应将其重新调整为Div区域的大小为302PX * 302PX.

2.当图像较小时,不应重新调整大小并完全显示在该特定的Div部分中.

例如:图像大小如50PX * 50PX,100PX * 100PX和302PX * 302PX,不应重新调整大小并显示在该Div部分中.

例如:图像大小如15PX * 15PX会显得很小.但是在上传文件时,这些图像也应显示

完全与该Div部分中的内容相同.但是图像会整齐地显示.

3.如果有使用ASP.Net的用于此类条件的任何工具.

请尽快给我答复.

Hi,

In my Web page,I have a Div section with height=302PX and width=302PX.

In another page,I had a File Upload control. When we will upload the image,then the image will be displayed in that Div section.

1.When the image is large,it should be re-size and display in that particular Div section completely.

For Eg:The image size like 350PX*350PX and 1024PX*1024PX, it should be re-size to Div Section size has 302PX*302PX.

2.When the image is Small,it shouldn''t be re-size and display in that particular Div section completely.

For Eg:The image size like 50PX*50PX,100PX*100PX and 302PX*302PX ,it shouldn''t be re-size and display in that Div section.

For Eg:The image size like 15PX*15PX these will appear very small.But When uploading the file these images also should displayed

completely with as it is in that Div section.But the image will displayed neatly.

3.If there are any tools for these type of conditions using ASP.Net.

Plz reply me ASAP.

推荐答案

我不确定HTML是否可以做到这一点.您需要一个最大尺寸",而不是一个尺寸.我建议使用HTTP处理程序来提供图像,以确保图像不超过特定大小,然后可以使用不施加大小限制的有限HTML来显示它们.
I am not sure if HTML can do this. You want a ''max size'' but not a size. I''d suggest a HTTP handler to serve images, which makes sure they are not above a certain size, then you can show them with limited HTML that does not impose size restrictions.


这篇关于图像放置不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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