按钮卡片特效代码集锦

53 篇文章 0 订阅
8 篇文章 1 订阅

css最好看最全的按钮卡片样式,动画效果大全,纯css样式打造的20款按钮特效和11款卡片合集,喜欢的可以收藏,备开发时使用。

按钮代码
<button class="custom-btn btn1"><span>Button</span></button>
<style>
 .custom-btn {
    width: 130px;
    height: 40px;
    color: #fff;
    border-radius: 5px;
    padding: 10px 25px;
    font-family: 'Lato', sans-serif;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, .5),
    7px 7px 20px 0px rgba(0, 0, 0, .1),
    4px 4px 5px 0px rgba(0, 0, 0, .1);
    outline: none;
   }
   .btn1 {
     background: linear-gradient(0deg, rgba(255, 151, 0, 1) 0%, rgba(251, 75, 2, 1) 100%);
     line-height: 42px;
     padding: 0;
     border: none;
   }
   .btn1 span {
      position: relative;
      display: block;
      width: 100%;
      height: 100%;
    }
    .btn1:before,
    .btn1:after {
       position: absolute;
       content: "";
       right: 0;
       bottom: 0;
       background: rgba(251, 75, 2, 1);
       box-shadow: -7px -7px 20px 0px rgba(255, 255, 255, .9),
       -4px -4px 5px 0px rgba(255, 255, 255, .9),
       7px 7px 20px 0px rgba(0, 0, 0, .2),
       4px 4px 5px 0px rgba(0, 0, 0, .3);
       transition: all 0.3s ease;
     }
    .btn1:before {
      height: 0%;
      width: 2px;
    }
    .btn1:after {
       width: 0%;
       height: 2px;
   }
    .btn1:hover {
      color: rgba(251, 75, 2, 1);
      background: transparent;
    }
    .btn1:hover:before {
      height: 100%;
    }
    .btn1:hover:after {
       width: 100%;
    }
   .btn1 span:before,
   .btn1 span:after {
      position: absolute;
      content: "";
      left: 0;
      top: 0;
      background: rgba(251, 75, 2, 1);
      box-shadow: -7px -7px 20px 0px rgba(255, 255, 255, .9),
      -4px -4px 5px 0px rgba(255, 255, 255, .9),
      7px 7px 20px 0px rgba(0, 0, 0, .2),
      4px 4px 5px 0px rgba(0, 0, 0, .3);
      transition: all 0.3s ease;
    }
   .btn1 span:before {
    width: 2px;
    height: 0%;
  }
   .btn1 span:after {
      height: 2px;
      width: 0%;
  }
   .btn1 span:hover:before {
    height: 100%;
   }

   .btn1 span:hover:after {
      width: 100%;
   }
</style>
卡片代码
 <div class="card1"></div>
 <style>
   .card1 {
      width: 190px;
      height: 254px;
      border-radius: 50px;
      background: #e0e0e0;
      box-shadow: 20px 20px 60px #bebebe,
      -20px -20px 60px #ffffff;
   }
 </style>

完整代码可查看​ ​附件链接​​

按钮特效

在这里插入图片描述

卡片合集

在这里插入图片描述

  • 5
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值