2
I have the following image for example:
The black line is the container of the page(mobile) and the red one the image, In example 1 is what I have today, and the 2 the result I’m trying to get, I’m not finding a solution without distorting the image, there’s some way?
follows code:
img {
display: inline-block;
width: 100%;
height: 100%;
transform: rotate(90deg);
}
.container {
background-color: #bbb;
width: 300px;
height: 400px;
}
<div class="container">
<img src="https://www.paypalobjects.com/digitalassets/c/website/marketing/na/us/credit/hub/prepaid-image.png?01AD=3tN7YRjc7dW4pgCz6srp1Zwrd3T603duDiW7xKKoinH54ISdhxQdalQ&01RI=BDC70922D249C25&01NA="/>
</div>
Interesting, it comes very close to what I would like, but there is no way to get the image as close as possible to the screen size?
– Lennon S. Bueno
@Lennons.Bueno has as yes, note the second example that I edited the code, adjusting the Heigh and width, and the left and top you can get very close to the container size.
– hugocsl
@Lennons.Bueno guy also set the first option, in it I used a Scale(1.35) to make the image occupy more space in the container
– hugocsl