我想把我的text:Text2
放在右边。我的Text1
放好了。请问我需要换什么?有了这些,我的Text2
在Text1
旁边
<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>