-3

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

在此处输入图像描述

4

1 回答 1

0

您实际上并不需要 flex box 来执行此操作,但这是您要查找的内容的近似表示。您还必须更改字体系列

<!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>

于 2018-09-07T19:28:25.263 回答