CSS位置如何影响元素的宽度/高度? [英] How does css position impact element width/height?

查看:87
本文介绍了CSS位置如何影响元素的宽度/高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

css位置的各种选项(静态,相对,绝对,固定)如何影响宽度/高度百分比的计算方式?这个问题可能太笼统而无法提供具体的答案,答案可能是两者不直接相关",但是我很难理解css位置对元素大小的影响.

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.

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

Links to related questions/answers are welcome.

推荐答案

我建议您阅读

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

这篇关于CSS位置如何影响元素的宽度/高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆