L
L
legionerium2020-08-20 15:32:39
Images
legionerium, 2020-08-20 15:32:39

How to keep image aspect ratio on ios?

Good day to all. There was, like, a banal problem, but for some reason I can not solve it in any way. The essence of the question is that there is a block, an image is placed in it. The image occupies the entire width of the block. The height is automatically adjusted accordingly. On Windows and Android, everything looks fine, as it should, but on ios, the image occupies the entire width of the block, as it should, but the image height does not fit (the image stretches to the entire height of the image).

<div class="pic_blc one mrg_bot_60">
  <img src="img/story/story_01.jpg" alt="">
</div>

<div class="pic_blc accommodation">
  <img src="img/story/story_03.jpg" alt="">
  <img src="img/story/story_04.jpg" alt="">
</div>


.pic_blc {
  width: 100%;
}
.pic_blc.one img {
  width: 100%;
  height: auto;
}
.pic_blc.accommodation img:first-child {
  width: 59%;
}
.pic_blc.accommodation img:last-child {
  width: 40%;
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question