1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| .header { height: 40px; background: lightblue; } .footer { height: 100px; background: lightcoral; }
.clearfix::after { content: ""; display: block; clear: both; }
.main { margin-left: 200px; margin-right: 300px; }
.center { width: 100%; height: 500px; background: lightgray; float: left; } .left { width: 200px; height: 500px; background: lightpink; float: left; margin-left: -100%; position: relative; left: -200px; } .right { width: 300px; height: 500px; background: lightgreen; float: left; margin-left: -300px; position: relative; right: -300px; }
|