I want to change an image so that its size is according to the screen resolution, for example 1920x1080 to 1600x900, using HTML and CSS.
How can I do it?
I want to change an image so that its size is according to the screen resolution, for example 1920x1080 to 1600x900, using HTML and CSS.
How can I do it?
use media Query. This will only works with relevant Screen resolution
@media only screen and (min-width: 1490px)
{
}
@media only screen and (max-width: 1490px) and (min-width: 1366px)
{
}
@media only screen and (max-width: 1366px) and (min-width: 1280px)
{
}
@media only screen and (max-width: 1280px) and (min-width: 1024px)
{
}
@media only screen and (max-width: 1024px) and (min-width: 768px)
{
}
HTML :
CSS :