设置这个padding的时候,内容输入了中文和英语他不在一行显示呢
怎么div标签里面的英语是一行,中文的是一行呢 这也跟什么级元素有关吗???、
dsafdsafjalkdsjflksjldkjflkj萨芬撒dgioierqioqindn,nzmxnc,ncxz,nvmc,zxnvnxz,nv士大夫大师mcxnz,n,mc
2016-12-11
<!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>
举报