Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question 开发者_如何学编程Here’s an image file: http://paradeepphosphates.com/templates/files/pdf/mar_31_2010.jpg
How can I make an image 100% in the browser?
If you simply link to an image, like you’ve done in the question, then the browser decides how to display it. Most browsers will zoom it by default so that it fits into the browser window. There isn’t anything you can do about that.
However, if you add the image to an HTML page, e.g.
<img src="http://paradeepphosphates.com/templates/files/pdf/mar_31_2010.jpg">
then it will be displayed at its “natural” size, i.e. one pixel in the image file will be represented as one pixel in the browser window. (I’m guessing that‘s what you mean by “100%”.)
How can I make an image 100% in the browser?
You will need to embed it into a HTML file, and give it a 100% width:
<img src="..." style="width: 100%">
There is no way to do this in the image resource itself - the browser will decide how to display that if requested separately.
精彩评论