我有以下反应代码,当我使用 Radium 进行内联样式时,媒体查询不起作用。它只是显示一个空白页作为输出。
import React, { Component } from 'react';
import Radium from 'Radium';
class contact extends React.Component {
render() {
var styles = {
base: {
background: 'blue',
border: 0,
borderRadius: 4,
color: 'red',
padding: '1.5em',
'@media (max-width: 700px)': {
background: 'yellow'
}
},
};
return (
<div style={styles.base}>
<p>Hello, World!</p>
</div>
)
}
}
module.exports = Radium(Contact);
我需要帮助找出这里的问题。提前致谢!