css位置如何影响元素宽度/高度?

时间:2021-06-04 20:07:11

How do the various options for css position (static, relative, absolute, fixed) impact the way percentage width/height is calculated? This question may be too generic to provide a concrete answer, and it's possible that the answer is "the two are not directly related", but I'm having trouble understanding the impacts of css position on element size.

如何计算css位置的各种选项(静态、相对、绝对、固定)对百分比宽度/高度的影响?这个问题可能太笼统,无法提供一个具体的答案,而且答案可能是“这两者之间没有直接的联系”,但是我在理解css位置对元素大小的影响方面有困难。

Links to related questions/answers are welcome.

欢迎链接到相关的问题/答案。

1 个解决方案

#1


3  

I recommend that you read A List Apart's CSS Positioning article. It's the best article I've seen on the web.

我建议您阅读列表中的CSS定位文章。这是我在网上看到的最好的文章。

#1


3  

I recommend that you read A List Apart's CSS Positioning article. It's the best article I've seen on the web.

我建议您阅读列表中的CSS定位文章。这是我在网上看到的最好的文章。