right 没定宽 为啥我这里显示的0,而不是你显示的100%呢?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>两列布局</title> <style> .left, .right { height: 300px; } .left { width: 300px; background-color: #c9394a; float: left; } .right { background-color: #cccccc; float: left; } </style> </head> <body> <div class="left"></div> <div class="right"></div> </body> </html>