随后使用标签时,随后有非英语字符的问题,彼此之后

发布于 2025-01-25 09:47:45 字数 1320 浏览 7 评论 0原文

当彼此之后立即使用标签时,我会面临问题(例如:span,'a'和'p')。 角色彼此合并,尽管它们位于单独的HTML标签中!

我如何防止这种情况发生?

    <a href="" class="underline mx-1">حریم شخصی</a>
    <a href="">استفاده</a>

    <span>حریم</span>
    <span>استفاده</span>
    <span>حریم</span>

codepen https://codepen.io/blackcrowxyz/phackcrowxyz/pen/jozozozor

我想要的:(

我得到的:(اسارف联是错误的)

样本输出:

”在此处输入图像说明“

https://i.sstatic.net/0mnyq.png“ alt =”在此处输入图像描述”>

I am facing an issue when using tags right after eachother(ex: span, 'a' and 'p').
characters merge with each other, although they are in seperate html tags!

How can I prevent that from happing?

    <a href="" class="underline mx-1">حریم شخصی</a>
    <a href="">استفاده</a>

    <span>حریم</span>
    <span>استفاده</span>
    <span>حریم</span>

Codepen: https://codepen.io/blackcrowxyz/pen/jOZOZoR

What I want:(استفاده حریم is right)
enter image description here

What I get:(استفادهحریم is wrong)
enter image description here

sample output:

enter image description here

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

左岸枫 2025-02-01 09:47:45

解决方案是使用&amp; nbsp;,因为标签之间的每个字符都将阻止问题发生。

    <span>قوانین و شرایط استفاده</span>
     
    <span>حریم شخصی</span>

结果:

The solution is to use   because every character in between tags, will prevent the issue from happening.

    <span>قوانین و شرایط استفاده</span>
     
    <span>حریم شخصی</span>

result:

enter image description here

最初的梦 2025-02-01 09:47:45

这是您想要的方式吗?

使用Flex

<script src="https://cdn.tailwindcss.com"></script>
<div class="p-4 w-64 flex justify-between">
  <span><a href="#">
    قوانین و شرایط استفاده
    </a></span>
    <span><a href="#">حریم شخصی</a>
    </span>
</div>

使用边距

<script src="https://cdn.tailwindcss.com"></script>
<div class="p-4">
  <span><a href="#" class="ml-5">
    قوانین و شرایط استفاده
    </a></span>
    <span><a href="#">حریم شخصی</a>
    </span>
</div>

Is this the way you want?

Using flex

<script src="https://cdn.tailwindcss.com"></script>
<div class="p-4 w-64 flex justify-between">
  <span><a href="#">
    قوانین و شرایط استفاده
    </a></span>
    <span><a href="#">حریم شخصی</a>
    </span>
</div>

Using margin

<script src="https://cdn.tailwindcss.com"></script>
<div class="p-4">
  <span><a href="#" class="ml-5">
    قوانین و شرایط استفاده
    </a></span>
    <span><a href="#">حریم شخصی</a>
    </span>
</div>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文