I have few devices like iPhone 11 Pro(1125 x 2436),Huwaui P30 Pro(1080 x 2340),iPad Pro (9.7-inch)(1536 x 2048). I want to write css that should work only for those devices not for laptop. I have written CSS but that also effect Laptop view since width is same. Here is the css below
style.css
@media only screen and (min-device-width:1080px) and (max-device-width: 1536px) {
.show-mobile {
display: block;
}
}
index.html
<div class="show-mobile">
Show it for mobile only
</div>