I have images whose size is (900x512). Since I'm going to make it responsive so that the images need to be adjusted within this proportional width of the screen !!
Using:
<img src="..." style="width: 100%; height: auto;" />
this will keep the proportions. height: autowill be sure it is heightnot set anywhere (as cale_b mentioned)
height: auto
height
If you use bootstrap, you can add a class img-responsiveto your images.
img-responsive
This class applies the following css properties
:
<img class="img-responsive" alt="My image" >
: http://getbootstrap.com/css/#images-responsive
, CSS.
.image{ width: 40%; border: 1px solid #ffffff; }
Source: https://habr.com/ru/post/1617651/More articles:Why is there unused white space between ELF partitions? - gccHow to convert int to float in python? - pythonCreating a pie chart in quick - initializationGetting error while trying to get authenticated user - phpProblems understanding filtering BeautifulSoup - pythonКак я могу многопоточно или многопроцессорно обрабатывать большие itertools.combinations в python? - performanceInstalling the debug package for Softether does not work on Ubuntu 14.04 - ubuntuRun cocos2d-x project in browser - c ++Reduce function does not handle empty list - pythonWin2D CanvasBitmap vs Microsoft.UI.Composition CompositionImage - c #All Articles