在页面里加js代码块,直接用jquery加你想应用的样式 $form = ActiveForm::begin([ 'fieldConfig'=>[ 'template'=> "{label}\n{input}\n{error}", ] ]);