给大家分享一个用css 3.0结合video视频实现的创意开幕,效果如下:
以下是代码实现,欢迎大家复制粘贴和收藏。
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>css 3.0结合video视频实现的创意开幕</title> <style> * { margin: 0; padding: 0; font-family: 'poppins', sans-serif; } body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #000; } h2 { position: relative; font-size: 3.4em; font-weight: 900; color: #fff; z-index: 1; overflow: hidden; margin: 20px 20px 0 0; } h2 span { color: #ff022c; } h2::before { content: ''; position: absolute; left: -20%; width: 120%; height: 100%; background: linear-gradient(90deg, transparent 0%, #000 5%, #000 100%); animation: animate 5.5s linear forwards; animation-delay: 2s; } @keyframes animate { 0% { left: -20%; } 100% { left: 110%; } } video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; pointer-events: none; mix-blend-mode: screen; } </style> </head> <body> <video src="https://klxxcdn.oss-cn-hangzhou.aliyuncs.com/histudy/hrm/media/08reverse.mp4" autoplay muted></video> <h2><span>we</span> must uni<span>te a</span>gainst covid-19</h2> </body> </html>
总结
到此这篇关于css 3.0 结合video视频实现的创意开幕的文章就介绍到这了,更多相关css video视频开幕内容请搜索移动技术网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持移动技术网!
如对本文有疑问, 点击进行留言回复!!
清除新版Google Chrome浏览器中表单控件(input,button...)默认的黑色边框
荐 20200714——git/mac配置/项目运行步骤/一些报错
antd 菜单组件 使用时报错:Cannot read property ‘isRootMenu‘ of undefined
CSS|div的style=“background-image: url(img/a.bmp)图片显示不出来
硬件仪表盘账号建立指导(一) --WHQL认证测试结果提交账号(一)
cookie的规范Cookie的不可跨域名性或Cookie与域名的关系
网友评论