尚品汇 伸缩盒模型案例练习

html代码

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

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 重置样式 */
    * {
      font-family: Arial;
      font-size: 14px;
      margin: 0;
      padding: 0;
      border: none;
    }

    a {
      text-decoration: none;
    }

    ul {
      list-style: none;
    }

    html,
    body {
      width: 100%;
      height: 100%;
    }

    body {
      background-image: url('flex/bg.jpg');
      background-repeat: no-repeat;
      background-size: cover;
      background-color: gray;
    }

    .page-header {
      height: 70px;
      background-color: rgba(0, 0, 0, 0.7);

      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 20px;
    }

    .header-nav {
      display: flex;
    }

    .header-nav li a {
      color: white;
      font-size: 20px;
      border: 1px solid white;
      border-radius: 8px;
      padding: 10px;
      margin-right: 20px;
    }

    .header-nav li:last-child a {
      margin-right: 0px;
    }

    .page-content {
      height: calc(100vh - 70px);

      display: flex;
      align-items: center;
    }

    .content-nav {
      width: 1000px;
      height: 300px;
      margin: 0 auto;
      display: flex;
      justify-content: space-evenly;
      align-items: center;
    }

    .content-nav .item {
      width: 180px;
      height: 200px;
      background-color: orange;

      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: space-evenly;
      font-size: 20px;
      transition: 0.2s linear;
      cursor: pointer;
    }

    .content-nav .item:hover {
      box-shadow: 0px 0px 20px black;
    }

    .content-nav .item span {
      font-style: 20px;
      color: white;
    }

    .content-nav .item:nth-child(1) {
      background-color: #595ca8;
    }

    .content-nav .item:nth-child(2) {
      background-color: #ff9d2e;

    }

    .content-nav .item:nth-child(3) {
      background-color: #015e91;
    }

    .content-nav .item:nth-child(4) {
      background-color: #1dc128;
    }

    .content-nav .item:nth-child(5) {
      background-color: #01a6de;
    }
  </style>
</head>

<body>
  <!-- 头部 -->
  <header class="page-header">
    <a href="#">
      <img src="flex/logo.png" alt="logo">
    </a>
    <ul class="header-nav">
      <li><a href="#">国内校区</a></li>
      <li><a href="#">缅甸校区</a></li>
      <li><a href="#">非洲校区</a></li>
      <li><a href="#">美国校区</a></li>
    </ul>
  </header>
  <!-- 内容区 -->
  <div class="page-content">
    <div class="content-nav">
      <div class="item">
        <img src="flex/item1.png" alt="">
        <span>我的邮箱</span>
      </div>
      <div class="item">
        <img src="flex/item2.png" alt="">
        <span>云服务</span>
      </div>
      <div class="item">
        <img src="flex/item3.png" alt="">
        <span>手机课堂</span>
      </div>
      <div class="item">
        <img src="flex/item4.png" alt="">
        <span>微信服务</span>
      </div>
      <div class="item">
        <img src="flex/item5.png" alt="">
        <span>在线服务</span>
      </div>
    </div>
  </div>
</body>

</html>

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

sinnp

谢谢宝子的打赏,mua!!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值