wordpress用elementor做的文章内容页模版,在编辑时设置了图片为居中,正式查看时发现文章图片不居中都是左对齐。
在elementor编辑Post Content属性时,选择高级设置,拉到最下面Custom CSS,输入。
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.aligncenter p.wp-caption-text {
display: block;
margin-left: auto;
margin-right: auto;
text-align: center;
}
评论前必须登录!
注册