css实现面包屑效果

一个带箭头箭尾的面包屑导航效果

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html;charset=gb2312" />
    <title>面包屑示例</title>
    <!-- <script src="./asserts/js/jquery-3.6.3.min.js"></script> -->
    <style type="text/css">
      * {
        margin: 0;
        padding: 0;
      }
      .bread ul,
      li {
        list-style: none;
      }

      .bread .box {
        position: relative;
        margin: 100px auto;
        background: #ccc;
        width: 600px;
        height: 32px;
        line-height: 32px;
        overflow: hidden;
      }

      .bread .box li {
        float: left;
        width: 200px;
        text-align: center;
        position: relative;
        z-index: 2;
      }

      .bread .box li em {
        width: 0;
        height: 0;
        border-color: transparent transparent transparent #fff;
        border-style: dashed dashed dashed solid;
        border-width: 24px 0 24px 24px;
        position: absolute;
        right: -24px;
        top: -8px;
        line-height: 0;
        font-size: 0;
      }

      .bread .box li i {
        width: 0;
        height: 0;
        border-color: transparent transparent transparent #ccc;
        border-style: dashed dashed dashed solid;
        border-width: 16px 0 16px 16px;
        position: absolute;
        right: -16px;
        top: 0;
        line-height: 0;
        font-size: 0;
      }

      .bread .box li.current {
        background: #933;
        z-index: 1;
      }

      .bread .box li.current i {
        border-color: transparent transparent transparent #933;
      }
    </style>
    <script type="text/javascript"></script>
  </head>
  <body>
    <div class="bread">
      <div class="box">
        <ul>
          <li>首页<em></em><i></i></li>
          <li>文章列表<em></em><i></i></li>
          <li class="current">当前内容<em></em><i></i></li>
        </ul>
      </div>
    </div>
  </body>
</html>

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

bbkkkk

你的鼓励将是我创作的最大动力

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

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

打赏作者

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

抵扣说明:

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

余额充值