我正在wavy header
我的网站上制作一个,我试图让它看起来像这样。
但相反,我在我的网站上得到了这个。
我尝试更改className
但仍然无法正常工作,这是我的代码:App.js:
function App() {
return (
<div className="App">
<div className="Wave-container">
<h1>Hello, world!</h1>
<p>Check out my awesome waves!</p>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320">
<path fill="#FFF" d="M0 54.6508V452.104C45.5 452.104 166.824 392.806 306 452.104C401.5 492.794 424.14 456.282 518 388.81C648.5 294.998 708.5 317.038 766.5 317.038C894.591 317.038 866.439 410.314 983 371.856C1159.5 313.622 1205.16 278.703 1271 245.267C1353 203.621 1373 202.317 1440 150.349V115.746V0H1400C1360 0 1280 0 1200 0C1120 0 1040 0 960 0C880 0 800 0 720 0C640 0 560 0 480 0C400 0 320 0 240 0C160 0 80 0 40 0H0V54.6508Z">
</path>
</svg>
</div>
</div>
);
}
应用程序.css:
.Wave-container {
position: relative;
background: #09F;
color: #FFF;
text-align: center;
overflow: hidden;
}
h1 {
font-size: 5rem;
margin: 7rem 1.25rem 2.5rem 1.25rem;
}
p {
font-size: 1.5rem;
margin: 0 1.25rem 5rem 1.25rem;
}
之前谢谢,任何帮助将不胜感激