I have these three CSS links for three different sized devices.
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/maxwidth959.css" rel='stylesheet'>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/maxwidth768.css" rel='stylesheet'>
<link href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/maxwidth600.css" rel='stylesheet'>
And media queries for all:
maxwidth959.css
@media only screen and (max-width: 959px)
{
// styles here
}
maxwidth768.css
@media only screen and (max-width: 768px)
{
// styles here
}
maxwidth600.css
@media only screen and (max-width: 600px)
{
// styles here
}
But only the last linked css(maxwidth600.css) CSS is taking effect others are overriding?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…