<template>
<div>
  <div class="conic"></div>
<div class="conic conic-demo"></div>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss">
body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #000;
}
*, *::before, *::after {
    box-sizing: border-box;
}
@keyframes rotate {
    100% {
        transform: rotate(1turn);
    }
}
.conic {
    position: relative;
    z-index: 0;
    width: 400px;
    height: 300px;
    margin: 20px;
    border-radius: 10px;
    overflow: hidden;
    padding: 2rem;
   
    &::before {
        content: '';
        position: absolute;
        z-index: -2;
        left: -50%;
        top: -50%;
        width: 200%;
        height: 200%;
        background-color: #1a232a;
        background-repeat: no-repeat;
        background-position: 0 0;
        background-image: conic-gradient(transparent, rgba(168, 239, 255, 1), transparent 30%);
        animation: rotate 4s linear infinite;
    }
   
    &::after {
        content: '';
        position: absolute;
        z-index: -1;
        left: 6px;
        top: 6px;
        width: calc(100% - 12px);
        height: calc(100% - 12px);
        background: #000;
        border-radius: 5px;
    }
}
.conic-demo::after {
    animation: opacityChange 5s infinite linear;
}
@keyframes opacityChange {
    50% {
        opacity:.5;
    }
    100% {
        opacity: 1;
    }
}
</style>
转自: https://csscoco.com/inspiration/#/./background/bg-conic-border-light-effect.md

最新文章

  1. 使用fiddler的autoResponder及设置手机端代理实现远程调试,出现的问题及解决办法
  2. zookeeper 故障重连机制
  3. SQL Server日期与字符串之间的转换
  4. phpstorm webstorm安装主题 sublime样 还有都可以用的注册码
  5. Unity3d 查找所选的是否引用过某资源
  6. Tautology 分类: POJ 2015-06-28 18:40 10人阅读 评论(0) 收藏
  7. Python爬虫学习笔记——防豆瓣反爬虫
  8. ruby编程语言-学习笔记3(第4章 表达式和操作符)
  9. oracle pl/sql 包
  10. sklearn交叉验证3-【老鱼学sklearn】
  11. Redis(2)---数据持久化
  12. mybatis中的foreach方法
  13. [Vue]createElement参数
  14. 【RAY TRACING THE REST OF YOUR LIFE 超详解】 光线追踪 3-7 混合概率密度
  15. 【T10】记住,TCP__IP不是轮询的
  16. layui数据表格的td模板
  17. Vagrant (3) —— 复制/备份Vagrant Box
  18. 本地管理表空间和字典管理表空间的特点,ASSM有什么特点
  19. linux下两台服务器文件实时同步方案实现-乾颐堂
  20. windows安装logstash-input-jdbc并使用其导入MMSQL数据

热门文章

  1. 了解Redis持久化
  2. select、poll和epoll的区别
  3. 知识点简单总结——minmax容斥
  4. Java基础 - 泛型详解
  5. 使用git clone 报错curl56 errno 10054解决方法
  6. 编写 Shell 程序,实现自动删除 50 个账号的功能,账号名为stud1 至 stud50 ?
  7. fiber核心(react 16)?
  8. Kafka03--Kafka消费者使用方式
  9. 什么是 OAuth?
  10. 4.RDD操作