江湖家居手机版修改手机自适应文字大小的方法
江湖家居至尊版,手机版浏览文字自适应屏幕大小,随着屏幕分辨率的增加,文字也相应变大,可是当屏幕宽度大于721像素时,文字突然部小了,原因为相关手机模板中CSS样式表个别设置不合理,解决方法如下:打开\themes\default\mobile\static\css\pub_app.css 样式表文件,查找如下代码:
@media (max-width:240px){
html { font-size: 75px;}
}
@media screen and (min-width: 240px) and (max-width: 319px){
html{font-size:75px;}
}
@media screen and (min-width: 320px) and (max-width: 479px){
html{font-size:100px;}
}
@media screen and (min-width: 480px) and (max-width: 639px){
html{font-size:150px;}
}
@media screen and (min-width: 640px) and (max-width: 719px){
html{font-size:200px;}
}
@media screen and (min-width: 720px) and (max-width:967px){
html{font-size:225px;}
}
@media (min-width:721px) {
html { font-size: 100px;}
}
修改为如下代码:
@media (max-width:240px){
html { font-size: 75px;}
}
@media screen and (min-width: 240px) and (max-width: 319px){
html{font-size:75px;}
}
@media screen and (min-width: 320px) and (max-width: 479px){
html{font-size:100px;}
}
@media screen and (min-width: 480px) and (max-width: 639px){
html{font-size:125px;}
}
@media screen and (min-width: 640px) and (max-width: 719px){
html{font-size:150px;}
}
@media screen and (min-width: 720px) and (max-width:967px){
html{font-size:150px;}
}
@media (min-width:721px) {
html { font-size: 150px;}
}
页:
[1]