首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在段落中中断

在段落中中断
EN

Stack Overflow用户
提问于 2022-03-14 09:47:02
回答 4查看 350关注 0票数 1

因此,由于某些原因,我无法在段落中创建一条折线,这样我就可以得到一条新的行。我用的是顺风和反应。

代码语言:javascript
复制
<p className="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">
Transform the way you interact with your customers. Collect valuable, actionable and credible feedback.</p>

所以我试过所有这些解决方案,但是我会出错。

1.

代码语言:javascript
复制
<p className="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">
    Transform the way you interact with your customers. <br> Collect valuable, actionable and credible feedback.</p>
代码语言:javascript
复制
<p className="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">
    Transform the way you interact with your customers. <br> Collect valuable, actionable and credible feedback.</br> </p>
代码语言:javascript
复制
<p className="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">
    Transform the way you interact with your customers. {"\n"} Collect valuable, actionable and credible feedback.</p>
EN

回答 4

Stack Overflow用户

发布于 2022-03-14 10:29:17

与答案这里相关

每个html标记都应该关闭,记住这是jsx而不是html。每个部件都应该关闭。

代码语言:javascript
复制
<br> in jsx ->  <br/>
<input> in jsx -> <input />

你可以读到更多关于jsx的这里

票数 1
EN

Stack Overflow用户

发布于 2022-03-14 10:19:04

第一个--它是正确的,只需使用一个自结束标记,这样就不会得到那个错误。

代码语言:javascript
复制
<p className="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg 
xl:text-xl">
Transform the way you interact with your customers. <br/> Collect valuable, 
actionable and credible feedback.</p>
票数 0
EN

Stack Overflow用户

发布于 2022-03-15 06:33:59

请在HTML中的任何标记中间使用<br>标记。所以,你可以用

标记从您想要断线的位置。守则如下:

代码语言:javascript
复制
<p className="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">
Transform the way you interact with your customers. <br> Collect valuable, actionable and credible feedback.</p>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71465724

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档