С советами от @ Jhecht
код:
import React from "react";
import "./styles.css";
export default function App() {
return (
<div className="Container">
<div className="Header" />
<div className="Content">
<div className="Carousel" />
<div className="main">
<div
className="card"
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
background: "transparent",
height: "200px"
}}
>
<div
style={{
height: "400px",
marginRight: "10px",
background: "green",
width: "350px"
}}
/>
<div
style={{
height: "400px",
marginRight: "10px",
background: "black",
width: "350px"
}}
/>
<div
style={{ height: "400px", background: "green", width: "350px" }}
/>
</div>
</div>
</div>
<div className="footer">a</div>
</div>
);
}
css:
body {
margin: 0;
height: 100vh;
}
.App {
font-family: sans-serif;
text-align: center;
}
.Container {
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
max-width: 100%;
}
.Header {
position: relative;
height: 80px;
flex: none;
background: #000;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}
.Content {
flex: 1;
}
.Carousel {
position: relative;
background: #1976d2;
background-image: url(http://planetbounce.m360.co.uk/wp-content/themes/planetbounce/assets/img/nottingham-park.png);
flex: none;
height: 280px;
background-repeat: no-repeat;
background-position: top center;
padding-top: 128px !important;
padding-bottom: 128px !important;
-webkit-clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2vw), 0 100%);
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2vw), 0 100%);
}
.main {
height: 400px;
background: yellow;
padding: 0 0.625em;
margin-left: auto !important;
margin-right: auto !important;
max-width: 97.2307692rem !important;
}
.footer {
max-height: 40px;
height: 40px;
height: 100%;
background: red;
flex: none;
}
.card {
transform: translateY(-100px);
}