Relatively position an element without it taking up space in document flow
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I relatively position an element, and have it not take up space in the document flow? 回答1: What you're trying to do sounds like absolute positioning. On the other hand, you can, however, make a pseudo-relative element, by creating a zero-width, zero-height, relatively positioned element, essentially solely for the purpose of creating a reference point for position, and an absolutely positioned element within that: Hi there, I'm 100px offset from where I ought to be, from the top and left. 回答2: Add a margin equal to the pixels that