reactjs - Next.js 样式仅适用于第一种样式
问题描述
我正在尝试按照文档使用 Next.js 样式,但当前代码仅适用于背景颜色,但不适用于图像上的测试类。我究竟做错了什么?
<div className="header-bg">
<Container className="pt-5 pb-5">
<Row className="align-items-center">
<Col>
<h1>Welcome to the home page. Here is some text</h1>
<p>Here is some paragraph text</p>
<Button variant="info">Learn More</Button>
</Col>
<Col>
<Image src="chair.png" className="test" />
</Col>
</Row>
</Container>
<style jsx>{`
.header-bg {
background: grey;
}
.test {
max-width: 15px;
}
`}</style>
</div>
解决方案
推荐阅读
- sql - SQL Server 中带有“和”条件的动态参数
- python - numpy 获取特定值的索引,发生在给定索引之后
- jquery - 使用 jQuery 从 textarea 中删除某些自定义 html
- flutter - Flutter中FormBuilderTextField的labelText左对齐
- string - 更改颤振字符串颜色
- python - python opengl与glfw鼠标滚轮缩放太远。相机覆盖数据对象
- c# - “数据库被锁定” C# & SQLite
- python - 如何将列表的每个元素添加为数据框新列的元素?
- python - 为什么我在运行 Telegram 机器人几个小时后得到“MySQL 服务器已消失”?
- c++ - Qt qmake windows中的链接龙框架