【问题标题】:How to make a Navbarl like this in React using flexbox如何使用 flexbox 在 React 中制作这样的导航栏
【发布时间】:2019-02-13 03:37:19
【问题描述】:

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

【问题讨论】:

    标签: css reactjs react-flexbox-grid


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多