风也温柔

计算机科学知识库

css screen height How to expand an image to full screen?

  :

  and no one a large image into a smallcss screen heightcss screen height How to expand an image to full screen?,

  Yes they do all the time you have two above .

  I have asked a of times for you to why those two demos do not do what you want but you have to .

  unity screen.height_css line-height 兼容_css screen height

   the :

  :

  , for ,each photo work the u200b givencss screen height,

  unity screen.height_css screen height_css line-height 兼容

  What is “u200bu200”? Aren’t they zero width space ?

  :

  then what you said above does not work for me

  unity screen.height_css line-height 兼容_css screen height

  Yes it does. Where’s your ?

  If you are an img (and not a image) then the image width and need to match the width and of the area you want to cover (which you said is the full ). the image will need to be width:100% and :100vh and then use -fit:cover to cover all the .

  Here’s the I can do to that.

  unity screen.height_css line-height 兼容_css screen height

  :

  the photo out of the

  It does not do that in any of the demos above. Where is your code where it is out of the ?

  Did you any of my post about the laws of ? I will be happy to again if it is sense to you.

  css line-height 兼容_css screen height_unity screen.height

  Let me start again with the :

   have an ratio.

  If an image is 500px by 250px then its ratio (2 / 1) must be you that shape. For that image to fit in a then in the world needs to open their at 500px x 250px (or at an ratio where is half the width of the image). That is never going to be true so if you want the image to cover the whole you have to size it to 100% width and of the and then to stop it being you use -fit:cover for or -size:cover for .

   else would in space and time to .

  There is no other that makes sense. It is as as that. I feel that you may be to do but until we see your code we can’t see where you are going wrong. As you can see all the demos so far are doing what you asked for.

  文章来源:https://www.sitepoint.com/community/t/how-to-expand-an-image-to-full-screen/413075