html聚光灯特效,CSS3聚光灯效果实现代码
下面是CSS3聚光灯效果实现代码
效果预览
Document
* {
margin: 0;
padding: 0;
}
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #222;
}
h1 {
color: #333;
font-size: 90px;
position: relative;
}
h1::after {
content: attr(data-spotlight);
/* content: 'Css 聚光灯效果'; */
color: transparent;
position: absolute;
top: 0;
left: 0;
clip-path: ellipse(100px 100px at 0% 50%);
background-image: url('https://images.unsplash.com/photo-1584840460878-3d65c4191bd6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60');
background-size: 150%;
background-position: center center;
background-clip: text;
-webkit-background-clip: text;
animation: identifier 3s infinite;
}
@keyframes identifier {
0% {
clip-path: ellipse(100px 100px at 0% 50%);
}
50% {
clip-path: ellipse(100px 100px at 100% 50%);
}
100% {
clip-path: ellipse(100px 100px at 0% 50%);
}
}
Css 聚光灯效果
html聚光灯特效,CSS3聚光灯效果实现代码相关推荐
- css制作流程卡片,css3卡片效果制作代码实例
Insert title here /* 顶部的盒子 */ .container{ width:1320px; margin:50px auto; } /* 翻转类样式 */ .flip{ width ...
- html动态散花代码,IOS实现签到特效(散花效果)的实例代码
本文讲述了IOS实现签到特效(散花效果)实例代码.分享给大家供大家参考,具体如下: 散花特效 #import /// 领取奖励成功 @interface RewardSuccess : NSObjec ...
- html聚光灯特效,jquery实现聚光灯效果的方法
本文实例讲述了jquery实现聚光灯效果的方法.分享给大家供大家参考.具体分析如下: 有时网站需要用jquery实现一种图片聚光灯特效,当鼠标滑过单组中的单个图标时,当前高亮,其它图标变暗的这种类似图 ...
- CSS3 聚光灯特效
1.效果图 2.源码 这里主要用到css3中的裁剪clip-path属性,以及动画animation属性 <!DOCTYPE html> <html><head>& ...
- CSS3特效 - 呼吸灯效果
CSS3特效 - 呼吸灯效果 1. 效果图 2. 代码如下 <!DOCTYPE html> <html> <head><meta http-equiv=&qu ...
- CSS Animatie是一款在线制作CSS3动画的工具,可以在线直接制作CSS3动画效果,生成代码...
CSS Animatie是一款在线制作CSS3动画的工具,可以在线直接制作CSS3动画效果,生成代码 CSS Animatie 彩蛋爆料直击现场 CSS Animatie是一款在线制作CSS3动画的工 ...
- 【HTML粒子流特效】(效果 + 代码)
阅读目录 效果展示 代码 效果展示 代码 以下即为全部源代码. 粒子特效.html <!DOCTYPE html> <html lang
- css3 文字 特效_惊人CSS3文字效果
css3 文字 特效 Astonishing CSS3 text effects In today's tutorial, I will show you six amazing CSS3 text ...
- css3星球围绕轨迹开场动画特效 带流星效果
css3星球围绕轨迹开场动画特效 带流星效果 .star 控制流星效果,角度速度可自定义 <!DOCTYPE html> <html class="two"> ...
最新文章
- 操作系统期末复习知识点
- 弹框位置设置html,JQuery弹出框定位实现方法
- 解决App启动时白屏的问题
- [ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify uniq
- pytorch命令式和符号式混合编程
- [Remoting FAQ]Loading a Remoting Host On IIS得到BadImageFormatException
- PowerDesigner反向数据库时sqlstate=37000或SQLSTATE=42S02错误
- python笔记2-冒泡排序
- 【通信】基于matlab多径衰落信道仿真【含Matlab源码 338期】
- Linux系统的命令应该如何记
- 【Excel】下拉填充相同的数据
- ~是什么意思 在C语言中,~0代表什么
- 怎么开启搜狗高速浏览器的手动升级?
- excel转pdf(poi+itextpdf)
- 史上最给力客厅风水 让你躲过血光之灾
- (result, consumed) = self._buffer_decode(data, self.errors, final)
- 009 系统镜像ISO GHO WIM和ESD的区别
- EasyExcel 筛选导出
- 加油站的汽油是按什么分类的
- python encoding是什么_python中encoding什么意思