JS中使用media实现响应式布局

网络编程 发布日期:2024/9/29 浏览次数:1

正在浏览:JS中使用media实现响应式布局

常见写法:

JS中使用media实现响应式布局

下面总结常见的响应式布局的分类:

@media screen and (max-width:320px){ 
 #talkFooter .editArea{…… }
}
@media screen and (min-width:321px) and (max-width:375px){ 
  #talkFooter .editArea{…… }
}
@media screen and (min-width:376px) and (max-width:414px){
 #talkFooter .editArea{…… }
}  
@media screen and (min-width:415px) and (max-width:639px){
 #talkFooter .editArea{……}
} 
@media screen and (min-width:640px) and (max-width:719px){
 #talkFooter .editArea{……}
}  
@media screen and (min-width:720px) and (max-width:749px){
 #talkFooter .editArea{……}
}  
@media screen and (min-width:750px) and (max-width:799px){
 #talkFooter .editArea{……}
}  
@media screen(min-width:800px){}

总结

以上所述是小编给大家介绍的JS中使用media实现响应式布局,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!

Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。