日期:2013-05-08  浏览次数:21114 次

DIV不换行的方法,如下代码:

  1. <html> 
  2. <head> 
  3. <title>DIV不换行的方法 - www.cxybl.com</title> 
  4. <style type="text/css"> 
  5. #bottom { 
  6.  margin:0 auto;/*下边居是0 */ 
  7.  width:300px; 
  8. #bottom div { 
  9.  width:60px; 
  10. #d1 {  
  11.  float:left;  
  12.  background:#f00; 
  13. #d2 {  
  14.  float:right;  
  15.  background:#0f0; 
  16. #d3 {  
  17.  float:right;  
  18.  background:#00f; 
  19. #d4 {  
  20.  float:right;  
  21.  background:#00f; 
  22. #d5 {  
  23.  float:right;  
  24.  background:#00f; 
  25. </style> 
  26. </head> 
  27. <body> 
  28. <div id="bottom"> 
  29. <div id="d3">d3</div> 
  30. <div id="d1">d1</div> 
  31. <div id="d2">d2</div> 
  32. <