[小记] 微信小程序-设置宽度时(设置100%或默认继承)会溢出屏幕

参考: https://blog.csdn.net/zx501244363xz/article/details/101451288

  • 场景:在使用 uin-app 或 原生微信小程序开发时,父组件设置了 padding,子组件宽度会显示异常。(不设置宽带时默认值为:inherit)
  • 解决方案:将宽度值设置为 “auto
    width: auto;