问题描述
我正在尝试使用 css 模块应用媒体查询,但没有成功。我的目标类是 .Burger
,我正在使用 Burger.module.css
来实现它:
Burger.module.css
.Burger {
width: 100%;
margin: auto;
height: 250px;
overflow: scroll;
text-align: center;
font-weight: bold;
font-size: 1.2rem;
};
@media (min-width: 1000px) and (min-height: 700px) {
.Burger {
width: 700px;
height: 600px;
};
};
Burger.js
import React from 'react';
import classes from './Burger.module.css';
import BurgerIngredient from './BurgerIngredient/BurgerIndgredient';
const Burger = ( props ) => {
return (
<div className={classes.Burger}>
<BurgerIngredient type={'bread-top'}/>
<BurgerIngredient type={'meat'}/>
<BurgerIngredient type={'cheese'}/>
<BurgerIngredient type={'bread-bottom'}/>
</div>
);
};
export default Burger;
知道我错过了什么吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)