
我是css的新手,这让我很难过.
让我们看一个清晰灵活的版本:
#container { background: gray; overflow: hidden; padding: 15px; }
#left { background: purple; width: 200px; float: left; margin: 0 15px 15px 0; }
#content { background: blue; overflow: hidden; margin: 0 0 15px 0 }
#footer { background: green; height: 50px; clear: left; }
Run Code Online (Sandbox Code Playgroud)
即使是width和height你看到一组是不必要的,省略当箱子可以调整其内容,我只是说他们用于演示目的.