如何使用flexbox在React中制作这样的Navbarl

问题描述 投票:-3回答:1

如何在Reactjs中使用flexbox制作这样的组件?

enter image description here

css reactjs react-flexbox-grid
1个回答
0
投票

你真的不需要弹性盒来做到这一点,但是它代表了你正在寻找的东西。您还必须更改字体系列

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Bradey Whitlock</title>
</head>

<body style="margin: 0px">
  <div style="background-color:#28AF42; height: 50px; display: flex; align-items: center; justify-content: space-around; font-family: monospace">
  <div style="color: white; font-size: 25px">edibit</div>
  <div style="display: flex; justify-content: space-around">
    <div style="background-color:#28AF42; border: 1px solid white; border-radius: 3px; padding: 3px 15px; color: white; margin-right: 20px; cursor: pointer">Sign In</div>
    <div style="background-color:#28AF42; border: 1px solid white; border-radius: 3px; padding: 3px 15px; color: white; cursor: pointer">Register</div>
  </div>
  </div>
</body>

</html>
© www.soinside.com 2019 - 2024. All rights reserved.