Tailwind css tailwindCss:如何使用lg-px-4

Tailwind css tailwindCss:如何使用lg-px-4,tailwind-css,Tailwind Css,我想使用px-4的页脚只 lg:px-4 但它不起作用 <footer class="footer py-5 text-white bg-gray-800"> <div class="flex flex-col items-center justify-between lg:flex-row max-w-6xl mx-auto lg:space-y-0 space-y-3"> <div class="space

我想使用px-4的页脚只

lg:px-4

但它不起作用

<footer class="footer py-5 text-white bg-gray-800">
<div class="flex flex-col  items-center justify-between lg:flex-row  max-w-6xl mx-auto 
lg:space-y-0 space-y-3">
<div class="space-x-4  lg:px-4">
<a href="#" target="_blank"><i class="icon-brand-instagram text-lg  text-white text-opacity-75  text-md hover:text-white"></i></a>
</div>
</div>
</footer>

根据文档,
lg
前缀值适用于大于1024px的屏幕。 因此,如果您的屏幕大小小于1024像素,您可能看不到效果。 在浏览器中快速缩小可以了解是否应用了填充


您还可以通过在
tailwind.config.js
文件中使用来更改此默认值,px将指定水平填充

lg指定响应屏幕的断点

lg=1024px@media(最小宽度:1024px){…}


它不工作可能是因为你的屏幕大小。尝试在chrome的开发工具中打开它,改变屏幕大小,使其低于/高于1024。它会工作

也许你的屏幕不超过1024像素