马黑PHP整站系统

就地取材:mask遮罩趣味玩法

位置: 首页 > 代码集锦[ 发布时间: 2025.8.14  作者: 马黑  阅读: 149 ]
<style> .ma { margin: 20px auto; width: 600px; height: 600px; background: url('https://638183.freep.cn/638183/Pic/38/st6.jpg') no-repeat 0/cover; overflow: hidden; position: relative; } .ma::before { position: absolute; content: ''; inset: 0; background: inherit; mask: url('https://638183.freep.cn/638183/web/svg/p1.svg') no-repeat center/50% 50%; -webkit-mask: url('https://638183.freep.cn/638183/web/svg/p1.svg') no-repeat center/50% 50%; animation: rot 3s linear infinite; } @keyframes rot { to { transform: rotate(360deg); } } </style> <div class="ma"></div>

前一篇: I Can(lrc_only模块演示)
下一篇: radial+mask实现图片转场效果

发表评论:

       

评论列表 [1条]

#1 | 飞飞 于 2025-8-15 10:01 发布: background: inherit;这个背景可以这样取

Copyright © 2023 All Right Reserved 马黑PHP文章管理整站系统v1.8
联系我们: gxblk@163.com