左右定宽 中间自适应

<!DOCTYPE html>  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
<title>无标题文档</title>  
</head>  
<body>
<div style = 'overflow:hidden;'>
    <div style = 'background:red;margin-left:300px;margin-right:200px;'>把此项div挪到最下方试试</div>
    <div style = 'float:left;'>float:left</div>
    <div style = 'float:right;'>float:right</div>
</div>
</body>  
</html>

(知识点:float在前的话就会在本行,float元素在后的话就会另起一行)上文中有提示,可以试试 

原文地址:https://www.cnblogs.com/aiyr/p/8677481.html