Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近再次查看 box-sizing 属性。我觉得边界框实际上是一个更合适的模型。我希望我的盒子包含填充和边框,而无需每次在宽度计算中都考虑它,这在使用 100% 宽度时实际上是不可能的。
那么问题是什么是陷阱?为什么我不应该使用边框框?
我能想到的唯一问题是 IE7&8 不支持,在 IE9 上工作正常