【发布时间】:2021-07-07 17:32:29
【问题描述】:
我正在为我的 CSS 使用 tailwindcss。所以为此我在顺风配置中定义了图像。然后我在其上应用了cover,但是当我更改屏幕尺寸时图像不会缩放。我认为通过添加 max-w-full min-h-full 可以解决问题,但没有。
import React from 'react'
import { CountdownEvent } from './CountdownEvent'
import { CarouselSaf } from './CarouselSaf'
import { Navbar } from './Navbar'
export const Home = () => {
return (
<section className="h-screen">
<div className="bg-safthon bg-no-repeat bg-cover max-w-full min-h-full">
<Navbar />
<div className="flex h-screen items-center">
<CountdownEvent />
</div>
</div>
</section>
)
}
【问题讨论】:
-
你能主持一些视觉再现吗? play.tailwindcss.comHow to Ask
标签: reactjs tailwind-css