Garder le rapport d'aspect de l'image CSS
img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
Mobile Star
img {
display: block;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
}
aspect-ratio: 16 / 9;
// horizontal/vertical
/* Exact resolution */
@media (-webkit-device-pixel-ratio: 1) {
p {
color: red;
}
}
/* Minimum resolution */
@media (-webkit-min-device-pixel-ratio: 1.1) {
p {
font-size: 1.5em;
}
}
/* Maximum resolution */
@media (-webkit-max-device-pixel-ratio: 3) {
p {
background: yellow;
}
}