html - 如何仅缩进包含在
元素?
问题描述
我正在工作的网站的文本呈现为段落,内部行由<br>
标签分隔。当单行长度超过容器 div 宽度并换行时,如何缩进换行的文本?
我试过在标签上使用margin-left
and ,但是当然,这只是在段落的第一行之后缩进所有内容,这不是我想要的。text-indent
<p>
<p>
Assuming that a containing div width is 27 characters, this line would wrap after the word 'containing', meaning that I'd like indentation for any new line created by wrapping within this sentence.
<br>
Then the start of this line should be aligned with 'Assuming' above, and the following lines created by wrapping (if any) should also be indented.
</p>
解决方案
推荐阅读
- swift - Swift:使用国际格式化字符串执行 Bash 命令
- api - Stardog:如何通过 http 协议将参数传递给 SPARQL 存储查询
- google-maps - MapFragment 加载但无法访问
- sql - 在 SQL Server 的组中选择不包含值的列
- search - 如何在可以是文本文件或日志文件的大文件中有效地搜索字符串(属性)?
- .htaccess - 将所有页面重定向到新域,但将特定 URL 重定向到新域上的特定页面
- python-3.x - 如何使用 pywinauto 从没有标题或 id 的静态无名对象获取信息?
- node.js - Puppeteer 查找数据使用情况
- mysql - 将数千条记录插入数据库
- android - Android Maps v2 - 尽管存在侦听器,但信息窗口单击不起作用