Is is possible in CSS to have different Image height/width according to the browser size: mobile/wide screen

  • Thread starter Thread starter Paul Kendal
  • Start date Start date
P

Paul Kendal

Is is possible in CSS to have different Image height/width according to the browser size.

For example, in the image below, I have set the image to 250px X 250px for wide screen. I however want it to change to 150px X 150px if a user is on a mobile phone.

Code:
<img  class="block  w-full" src="{{asset($image)}}"
 style='width: 250px; height: 250px; object-fit: cover;'/>

Continue reading...
 
Back
Top Bottom