CSS margin not working in my react typescript project
My code:
const Home: React.FC = () => {
return (
<div style={{ width: "100vw", background: "skyblue" }}>
<div
style={{
background: "red",
height: "100px",
width: "100px",
marginLeft: "100px",
}}
></div>
</div>
);
};
Your margin is overridden by margin: 0px !important
which is declared in your App.css
file
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.