如何讓文字自動換行
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>混合布局編程挑戰</title>
<style type="text/css">
body{ margin:0; padding:0; font-size:30px; font-weight:bold}
/*div{ line-height:50px}*/
.top{height:50px;width:100%;background: #9CF}
.main{width:900px;background:#9F9;margin:0 auto;}
.left{height: 200px;width:200px;background: #ccc;float:left;? position:absolute; }
.right{height: 200px;background:#FCC; margin:0? 0 0 200px;}
.foot{height:50px;width:100%;background: #9CF;clear:both;}
</style>
</head>
<body>
<div class="top">top</div>
<div class="main">
?? ?
??? <div class="left">left</div>
???
<div
class="right">right000000000000000000000000000000000000000000000000000000000000000000000000000000000000</div>
</div>
<div class="foot">foot</div>
</body>
</html>
<div class="right">? </div>
里面的文字會跑到div外,應該怎么進行修改?
2016-07-23
已解決,在
中,加入
即可
2016-07-23
給 div類名為right設置一個左浮動
2016-07-23
<div class="right"><div>文本內容</div></div>
試試?