简体   繁体   中英

Tailwind, Vue problem with non-English characters when using tags right after eachother

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) 在此处输入图像描述

What I get:(استفادهحریم is wrong) 在此处输入图像描述

sample output:

在此处输入图像描述

在此处输入图像描述

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

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

result:

在此处输入图像描述

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM