Css+Div布局时如何在文字中插入空格?

html-css011

Css+Div布局时如何在文字中插入空格?,第1张

需要准备的材料分别有:电脑、浏览器、html编辑器。

1、首先,打开html编辑器,新建html文件,例如:index.html。

2、在index.html中的<body>标签中,输入html代码:

<div>hello&nbsp&nbsp&nbspspace</div>

3、浏览器运行index.html页面,此时成功通过&nbsp在文字间插入了空格。

可以具体 一点吗?是div文本自增高还是什么的?

word-wrap:break-word

word-break:break-all

这个是自动换行的