怎么div标签里面的英语是一行,中文的是一行呢 这也跟什么级元素有关吗???、
dsafdsafjalkdsjflksjldkjflkj萨芬撒dgioierqioqindn,nzmxnc,ncxz,nvmc,zxnvnxz,nv士大夫大师mcxnz,n,mc
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>填充</title>
<style type="text/css">
#box1{
width:100px;
height:100px;
padding:10px 20px 15px 30px;
border:1px solid red;
word-wrap:break-word
}
</style>
</head>
<body>
<div id="box1">dsafdsafjalkdsjflksjldkjflkj萨芬撒dgioierqioqindn,nzmxnc,ncxz,nvmc,zxnvnxz,nv士大夫大师mcxnz,n,mc</div>
</body>
</html>
这样就可以了
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>填充</title>
<style type="text/css">
#box1{
width:100px;
height:100px;
padding:10px 20px 15px 30px;
border:1px solid red;
float:left;
}
</style>
</head>
<body>
<div id="box1">dsafdsafjalkdsjflksjldkjflkj萨芬撒dgioierqioqindn,nzmxnc,ncxz,nvmc,zxnvnxz,nv士大夫大师mcxnz,n,mc</div>
</body>
</html>
可能你的宽度没给够