首页 前端知识 使用 HTML/CSS 实现 Educoder 顶部导航栏------第3关:实现右侧功能图标排序

使用 HTML/CSS 实现 Educoder 顶部导航栏------第3关:实现右侧功能图标排序

2024-11-05 23:11:18 前端知识 前端哥 74 947 我要收藏
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Educoder</title>
 
</head>
<style type="text/css">
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
  <script src="step3/verify.js"></script>
  body {
    padding: 0;
    margin: 0;
  }

  .container {
    min-width: 1200px;
  }

  .flex {
    display: flex;
  }

  .full-height {
    height: 100%;
  }

  header {
    background: #24292D;
    height: 60px;
    justify-content: space-between;
    padding: 0 25px;
  }

  header>div {
    height: 100%;
    display: flex;
    align-items: center;
  }

  .logo-block {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .logo {
    width: 40px;
    height: 38px;
    margin-right: 30px;
  }

  .menu-item {
    color: #ffffff;
    font-size: 16px;
    width: 64px;
    height: 100%;
    display: flex;
    align-items: center;
    margin-right: 30px;
    position: relative;
  }

  .hot {
    position: absolute;
    top: 10px;
    right: -22px;
  }

  /*********** Begin ************/
  .icon-item {
    height: 100%;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .user {
    width: 34px;
    height: 34px;
    margin-left: 15px;
  }

  /*********** End ************/
</style>

<body>
  <div class="container">
    <header class="flex">
      <div class="left-wrap">
        <div class="logo-block">
          <img src="https://data.educoder.net/images/educoder/headNavLogo.png?1526520218" class="logo">
        </div>
        <div class="menu-block full-height flex">
          <div class="menu-item"><span>实践课程</span></div>
          <div class="menu-item"><span>翻转课堂</span></div>
          <div class="menu-item"><span>实训项目</span></div>
          <div class="menu-item"><span>在线竞赛<img class="hot"
                src="https://img-blog.csdnimg.cn/2022010612112358534.png"></span></div>
          <div class="menu-item"><span>教学案例</span></div>
          <div class="menu-item"><span>交流问答</span></div>
        </div>
      </div>
      <div class="right-wrap">
        <!--********** Begin **********-->
        <div class="icon-list full-height flex">
          <div class="icon-item"><img src="https://data.educoder.net/api/attachments/R2FpZnNZdXdxbmo4V1RGdTRXcVpEZz09"
              alt=""></div>
          <div class="icon-item"><img src="https://data.educoder.net/api/attachments/V1NidDVCUy9uUjZWL0FZMHVscXpqQT09"
              alt=""></div>
          <div class="icon-item"><img src="https://data.educoder.net/api/attachments/NXp0NmtzNEZKTVBCcS9rL005Y1dGZz09"
              alt=""></div>
        </div>
        <img class="user" src="https://data.educoder.net/images/avatars/User/b?t=1569204859650" alt="">
        <!--********** End **********-->
      </div>
    </header>
  </div>
</body>

</html>

已通过。

 

(关于我一直过不去,只能自己改自己发的那些事。) 

请直接复制粘贴整个代码------题目给的原代码有误。

转载请注明出处或者链接地址:https://www.qianduange.cn//article/20054.html
标签
评论
发布的文章
大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!