import React from 'react';
export default class Ad extends React.Component {
componentDidMount() {
((window as any).adsbygoogle = (window as any).adsbygoogle || []).push({});
}
render() {
return (
<div className="flex">
<ins
className="adsbygoogle gri-bg"
style={{
display: 'inline-block',
width: '970px',
height: '60px',
margin: 'auto',
}}
data-ad-client="ca-pub-1880000000000"
data-ad-slot="12000000"
data-ad-channel="780000000"
/>{' '}
</div>
);
}
}
问题是我要把这段加进去怎么加?
.adslot_1 { display:block; width: 320px; height: 50px; }
@media (max-width: 400px) { .adslot_1 { display: none; } }
export default class Ad extends React.Component {
componentDidMount() {
((window as any).adsbygoogle = (window as any).adsbygoogle || []).push({});
}
render() {
return (
<div className="flex">
<ins
className="adsbygoogle gri-bg"
style={{
display: 'inline-block',
width: '970px',
height: '60px',
margin: 'auto',
}}
data-ad-client="ca-pub-1880000000000"
data-ad-slot="12000000"
data-ad-channel="780000000"
/>{' '}
</div>
);
}
}
问题是我要把这段加进去怎么加?
.adslot_1 { display:block; width: 320px; height: 50px; }
@media (max-width: 400px) { .adslot_1 { display: none; } }