css样式,背景渐变+图片,三角-实心-空心

渐变背景+背景图片

background: url("../../assets/images/index/arrowLeft.png") repeat
            no-repeat,
          linear-gradient(to bottom, $color44 10%, $color4, $color44 90%);

背景图匀速过度

@keyframes moveLeft {
  0% {
    background-position: 320px center;
  }
  100% {
    background-position: 0px center;
  }
}

 animation: moveLeft 5s linear infinite;

css画三角 -实心
实心三角一:

width:0;
height:0;
border:30px solid;
border-color: #f00 #ff0 #f0f #0ff;

实心三角二
在这里插入图片描述

<a class="a-after">
a.a-after::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    background: #f00;
    border-width: 0 20px 30px 20px;
    border-color: #000 #000 #f0f #000;
    border-style: solid;
}

实心三角三
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

    content: "";
    display: block;
    width: 10px;
    height: 10px;
    background: #f00;
    clip-path: polygon(0 0, 100% 50%, 0 100%,);//右

    clip-path: polygon(50% 0, 100% 100%, 0 100%); //上
	clip-path: polygon(50% 0,0 100%,10% 100%,50% 20%,50% 20%,85% 90%,10% 90%,10% 100%,100% 100%); //空心三角上

这个网站CSS clip-path maker你可以快捷地创建简单的 clip-path 图形
在这里插入图片描述

css画三角-空心

//html部分
 <div class="tabs">
          <span @click="tagSwitch(0)" class="hand">
            <span class="tabLeft" :class="{ activeTab: tagType == 0 }"></span>
            <span class="tab-item" :class="{ activeTab: tagType == 0 }"
              >业务类</span
            >
          </span>
          <span @click="tagSwitch(1)" class="hand">
            <span class="tab-item" :class="{ activeTab: tagType == 1 }"
              >部门类</span
            >
            <span class="tabRight" :class="{ activeTab: tagType == 1 }"></span>
          </span>
        </div>
        
//data定义数据部分
tagType:0

//css部分
.tabs {
  color: $-primary;
  font-weight: bold;
  position: relative;
  display: inline-block;
  margin: 40px 0 20px 0;
  .tab-item {
    padding: 6px 20px;
    border: 1px solid $-primary;
  }
  .activeTab {
    background-color: $-primary !important;
    color: #fff;
  }
  .tabLeft,
  .tabRight {
    position: absolute;
    display: inline-block;
    width: 24px;
    height: 24px;
    border-top: 1px solid $-primary;
    border-right: 1px solid $-primary;
    z-index: 99;
    background-color: #fff;
    margin-top: -1px;
  }
  .tabLeft {
    left: -12px;
    transform: rotate(-135deg);
  }
  .tabRight {
    right: -12px;
    transform: rotate(45deg);
  }
}

在这里插入图片描述

.staff_name_header::after {
      content: "";
      display: inline-block;
      width: 24px;
      height: 16px;
      background: linear-gradient(to bottom, #333 50%, transparent 0);
      background-size: 100% 4px;
      clip-path: polygon(40% 0, 60% 0, 100% 100%, 0% 100%);
      vertical-align: middle;
      margin-left: 4px;
    }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值