修改Astra移动设备(响应式)字体大小

1. 修改css文件

1.1 FTP文件路径

原版:/home/www/htdocs/wp-content/themes/astra/assets/css/unminified/style.css
压缩版:/home/www/htdocs/wp-content/themes/astra/assets/css/minified/style.min.css

1.2 WordPress后台导航

Appearance -> Theme Editor -> assets -> css -> minified -> style.min.css
Appearance -> Theme Editor -> assets -> css -> unminified -> style.min.css

1.3 增加以下css代码

@media only screen and (max-width: 320px) {
p {
  font-size: 110%;
 }
}
@media only screen and (max-width: 420px) {
p {
  font-size: 110%;
 }
}
@media only screen and (max-width: 544px) {
p {
  font-size: 110%;
 }
}
@media only screen and (max-width: 768px) {
p {
  font-size: 110%;
 }
}
@media only screen and (max-width: 782px) {
p {
  font-size: 110%;
 }
}
@media only screen and (max-width: 992px) {
p {
  font-size: 110%;
 }
}

2. 修改css版本号

FTP 文件路径: /home/www/htdocs/wp-content/themes/astra/functions.php
WordPress后台导航: Appearance -> Theme Editor -> Theme Functions

/**
 * Define Constants
 */
define( 'ASTRA_THEME_VERSION', '2.5.5' ); // 每次修改css文件,版本号加1即可。

备注:如果不修改版本号,修改css文件后无效果。

3. 删除缓存(重要)

3.1 清除 WP Super Cache 缓存
3.2 清除浏览器缓存