我的描述文字没有响应,但键入的文字效果很好
The text of my description is not responsive but typed text is doing well
我真的不知道它背后的原因是什么,但是当我通过键盘使用一些键入的文本时,它应该是完全响应的,但是当我使用 $post->description
它忽略列和行及其离开桌面。
在这里你可以看到普通文本是如何响应的:
<div class="row" style="max-width: 100vw">
<div class="col-md-12">
Here at L2 Arena, we have the flawless Arena Sets/Shields/Masks and Icarus Weapons.
We believe that customized and balanced equipment make the game more exciting.
We also have a vote system so we can rank higher and bring more people to have more fun.
If the players are voting for L2 Arena, they will be rewarded with vote items.
And we plan to keep our server simple, balanced and without wipes for as long as we can.
</div>
</div>
而当我想显示 post 描述时,它是这样的:
<div class="row" style="max-width: 100vw">
<div class="col-md-12">
{{$post->description}}
</div>
</div>
它没有收缩,我想知道为什么以及如何解决这个问题。
编辑:感谢评论,这修复了它:
<div class="row" style="max-width: 100vw">
<div class="col-md-12" style="word-wrap: break-word;">
{{$post->description}}
</div>
</div>
检查是否出现了 dd() el cual es equivalente a var_dump() de php en Laravel.
dd($post->description);
并告诉我你看到了什么。
您的字符串没有 space .
使用word-wrap: break-word;
在长字符串
中不存在space的情况下换行
我真的不知道它背后的原因是什么,但是当我通过键盘使用一些键入的文本时,它应该是完全响应的,但是当我使用 $post->description
它忽略列和行及其离开桌面。
在这里你可以看到普通文本是如何响应的:
<div class="row" style="max-width: 100vw">
<div class="col-md-12">
Here at L2 Arena, we have the flawless Arena Sets/Shields/Masks and Icarus Weapons.
We believe that customized and balanced equipment make the game more exciting.
We also have a vote system so we can rank higher and bring more people to have more fun.
If the players are voting for L2 Arena, they will be rewarded with vote items.
And we plan to keep our server simple, balanced and without wipes for as long as we can.
</div>
</div>
而当我想显示 post 描述时,它是这样的:
<div class="row" style="max-width: 100vw">
<div class="col-md-12">
{{$post->description}}
</div>
</div>
它没有收缩,我想知道为什么以及如何解决这个问题。
编辑:感谢评论,这修复了它:
<div class="row" style="max-width: 100vw">
<div class="col-md-12" style="word-wrap: break-word;">
{{$post->description}}
</div>
</div>
检查是否出现了 dd() el cual es equivalente a var_dump() de php en Laravel.
dd($post->description);
并告诉我你看到了什么。
您的字符串没有 space .
使用word-wrap: break-word;
在长字符串
中不存在space的情况下换行