foreword
- It is because it is not a box model, so the padding on the right will not take effect. Setting it to a box model solves the problem.
Code solution - css
// 设置盒子模型-解决右边内边距不生效
box-sizing:border-box;
// 设置盒子模型-解决右边内边距不生效
box-sizing:border-box;