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
<!DOCTYPE html> <html> <head> <style type="text/css"> .float, .float + div { float: left; height: 200px; width: 100px; background: #ccc; } .float + div{ float:right; } #bg { background: url() #999 fixed; height: 100px; } </style> </head> <body> <div class="float"></div> <div></div> <div id="bg"></div> </body> </html>