【发布时间】:2021-04-03 20:12:47
【问题描述】:
默认情况下,ul 有一个 justify-start flexbox 属性。当为 small 屏幕应用响应式设计时:它将是 justify-center,对于 medium 屏幕:justify-around 对于大屏幕:justify-evenly。 但是,对于所有屏幕尺寸,它只显示 justify-evenly 属性,它会覆盖所有其他 justify-property。 如何为不同的屏幕应用不同的 justify-property?
<nav className='py-8'>
<ul className='flex flex-row justify-start bg-red-400 sm:flex-row-reverse justify-center md:flex-row justify-around lg:flex-row-reverse justify-evenly'>
<Link href='#'>
<a className='p-2 text-2xl font-bold transition duration-500 hover:bg-indigo-300'> Beginnings</a>
</Link>
<Link href='#'>
<a className='p-2 text-2xl font-bold hover:bg-indigo-300'> Now</a>
</Link>
<Link href='#'>
<a className='p-2 text-2xl font-bold hover:bg-indigo-300'> Tech</a>
</Link>
<Link href='#'>
<a className='p-2 text-2xl font-bold hover:bg-indigo-300'> Talks</a>
</Link>
<Link href='#'>
<a className='p-2 text-2xl font-bold hover:bg-indigo-300'> Connect</a>
</Link>
</ul>
</nav>
【问题讨论】:
标签: html css flexbox frontend tailwind-css