我的顺风不起作用,因为我想我的Text2不是很好



我想把我的text:Text2放在右边。我的Text1放好了。请问我需要换什么?有了这些,我的Text2Text1旁边

<div className="w-screen h-screen flex">
...
<div className="flex-1 h-full flex flex-col">
...
<div className="flex-1 flex flex-col bg-primary-500/5 dark:bg-red-400 overflow-y-auto">
...
<div className="shrink-0 h-10 text-sm text-gray-700 bg-white dark:bg-slate-900 px-5 flex items-center">
Text1
<div className='flex-1'>
Text2
</div>
</div>
</div>
</div>
</div>

试试这个例子。我添加了两个属性到Text2向右偏移。

<div class="flex-1 flex justify-end">Text2</div>

<script src="https://cdn.tailwindcss.com"></script>
<div class="w-screen h-screen flex">
...
<div class="flex-1 h-full flex flex-col">
...
<div class="flex-1 flex flex-col bg-primary-500/5 dark:bg-red-400 overflow-y-auto">
...
<div class="shrink-0 h-10 text-sm text-gray-700 bg-white dark:bg-slate-900 px-5 flex items-center text-white">
Text1
<div class="flex-1 flex justify-end">Text2</div>
</div>
</div>
</div>
</div>

相关内容

  • 没有找到相关文章

最新更新