xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

CSS clip-path All In One

CSS clip-path All In One

clip-path

https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path

/* Keyword values */
clip-path: none;

/* <clip-source> values */
clip-path: url(resources.svg#c1);

/* <geometry-box> values */
clip-path: margin-box;
clip-path: border-box;
clip-path: padding-box;
clip-path: content-box;
clip-path: fill-box;
clip-path: stroke-box;
clip-path: view-box;

/* <basic-shape> values */
clip-path: inset(100px 50px);
clip-path: circle(50px at 0 100px);
clip-path: ellipse(50px 60px at 0 10% 20%);
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
clip-path: path('M0.5,1 C0.5,1,0,0.7,0,0.3 A0.25,0.25,1,1,1,0.5,0.3 A0.25,0.25,1,1,1,1,0.3 C1,0.7,0.5,1,0.5,1 Z');

/* Box and shape values combined */
clip-path: padding-box circle(50px at 0 100px);

/* Global values */
clip-path: inherit;
clip-path: initial;
clip-path: revert;
clip-path: revert-layer;
clip-path: unset;

https://interactive-examples.mdn.mozilla.net/pages/css/clip-path.html


demos

赛博朋克 2077

@supports ((-webkit-clip-path:polygon(0 2%,100% 2%,100% 5%,0 5%)) or (clip-path:polygon(0 2%,100% 2%,100% 5%,0 5%)))
.btn-preorder:hover .btn-preorder--glitch, .btn-preorder:hover .btn-preorder__text:after {
    -webkit-animation-direction: alternate;
    animation-direction: alternate;
    -webkit-animation-duration: 2s;
    animation-duration: 2s;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-name: glitch-anim-1;
    animation-name: glitch-anim-1;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
    display: block;
}



@supports ((-webkit-clip-path: polygon(0 2%,100% 2%,100% 5%,0 5%)) or (clip-path:polygon(0 2%,100% 2%,100% 5%,0 5%))) {
    .btn-preorder:hover .btn-preorder--glitch,.btn-preorder:hover .btn-preorder__text:after {
        -webkit-animation-direction:alternate;
        animation-direction: alternate;
        -webkit-animation-duration: 2s;
        animation-duration: 2s;
        -webkit-animation-iteration-count: infinite;
        animation-iteration-count: infinite;
        -webkit-animation-name: glitch-anim-1;
        animation-name: glitch-anim-1;
        -webkit-animation-timing-function: linear;
        animation-timing-function: linear;
        display: block
    }
}


https://www.cyberpunk.net/us/zh-cn/

https://www.bilibili.com/video/BV1KB4y1R7s9/

tongqu / 同济大学 -> 同去

https://tongqu.me/

https://tongqu.sjtu.edu.cn/

twitter & clap effect

vue-clap-button (shit npm package demo) 💩

https://jsbin.com/kapomaw/edit?html,output

https://gist.github.com/xgqfrms/172096109549ca406aee0d102413f69d?permalink_comment_id=4291365#gistcomment-4291365

https://gist.github.com/xgqfrms/172096109549ca406aee0d102413f69d?permalink_comment_id=4291392#gistcomment-4291392

refs



©xgqfrms 2012-2025

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @   xgqfrms  阅读(102)  评论(5编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2018-11-26 RunKit & NPM
2018-11-26 GraphQL & Apollo & Vue
2018-11-26 enter & keypress
2015-11-26 cygwin 的正确安装教程
2015-11-26 FTP 与 SSH 的安全性对比, 以及FTP,SSH,SFTP,SCP 的关系简单解析!
2015-11-26 关于 在cygwin64 Terminal 输入 $ ssh ,却报错 -bash: ssh: command not found 的解决方案 !
2015-11-26 Redis nosql database
点击右上角即可分享
微信分享提示