今天给大家带来一款纯css3实现的发光屏幕旋转特效。该屏幕由纯css3实现带发光旋转特效,效果图如下:
实现的代码。
html代码:
XML/HTML Code复制内容到剪贴板- <div class="screen">
- </div>
css3代码:
CSS Code复制内容到剪贴板- *{
- margin: 0;
- padding: 0;
- }
- *,
- *:before,
- *:after {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- }
- html,body{
- height: 100%;
- }
- html{
- background-color: #1d1d1d;
- }
- body{
- position: relative;
- margin: 0;
- padding: 0;
- transform-style: preserve-3d;
- -webkit-perspective: 500px;
- perspective: 500px;
- }
- /*Screen*/
- .screen{
- position: absolute;
- top: 50%;
- left: 50%;
- width: 320px;
- height: 210px;
- margin-top: -105px;
- margin-left: -160px;
- border-radius: 8px;
- box-shadow: 0 0 80px #0caba8;
- overflow: hidden;
- z-index: 100000;
- -webkit-animation: screenMove01 2s,
- boxShine 2.5s 2s infinite alternate ,
- screenMove02 5s infinite alternate linear;
- -moz-animation: screenMove01 2s,
- boxShine 2.5s 2s infinite alternate ,
- screenMove02 5s infinite alternate linear;
- -o-animation: screenMove01 2s,
- boxShine 2.5s 2s infinite alternate ,
- screenMove02 5s infinite alternate linear;
- animation: screenMove01 2s,
- boxShine 2.5s 2s infinite alternate ,
- screenMove02 5s infinite alternate linear;
- }
- .screen::before{
- display: block;
- content:"";
- position: absolute;
- top: 0;
- left: 0;
- width: 320px;
- height: 210px;
- border-width: 5px;
- border-style: solid;
- border-image: -webkit-linear-gradient(to bottombottom, rgba(29,186,180,1) 0%, rgba(126,252,247,1) 26%, rgba(227,253,252,1) 30%, rgba(126,252,247,1) 36%, rgba(29,186,180,1) 52%, rgba(29,186,180,1) 74%, rgba(164,247,244,1) 91%, rgba(29,186,180,1) 100%) 1;
- border-image: -moz-linear-gradient(to bottombottom, rgba(29,186,180,1) 0%, rgba(126,252,247,1) 26%, rgba(227,253,252,1) 30%, rgba(126,252,247,1) 36%, rgba(29,186,180,1) 52%, rgba(29,186,180,1) 74%, rgba(164,247,244,1) 91%, rgba(29,186,180,1) 100%) 1;
- border-image: -o-linear-gradient(to bottombottom, rgba(29,186,180,1) 0%, rgba(126,252,247,1) 26%, rgba(227,253,252,1) 30%, rgba(126,252,247,1) 36%, rgba(29,186,180,1) 52%, rgba(29,186,180,1) 74%, rgba(164,247,244,1) 91%, rgba(29,186,180,1) 100%) 1;
- border-image: linear-gradient(to bottombottom, rgba(29,186,180,1) 0%, rgba(126,252,247,1) 26%, rgba(227,253,252,1) 30%, rgba(126,252,247,1) 36%, rgba(29,186,180,1) 52%, rgba(29,186,180,1) 74%, rgba(164,247,244,1) 91%, rgba(29,186,180,1) 100%) 1;
- }
- .screen::after{
- display: block;
- content:"";
- position: absolute;
- top: 3px;
- left: 3px;
- width: 314px;
- height: 204px;
- border: 3px solid #1d1d1d;
- border-color:rgba(29,29,29,0.9);
- border-radius: 5px;
- background: -webkit-linear-gradient( 135deg, rgba(29,186,180,1) 0%, rgba(227,253,252,1) 17%, rgba(227,253,252,1) 25%, rgba(42,197,191,1) 48%, rgba(126,252,247,1) 93%, rgba(29,186,180,1) 100%);
- background: -moz-linear-gradient( 135deg, rgba(29,186,180,1) 0%, rgba(227,253,252,1) 17%, rgba(227,253,252,1) 25%, rgba(42,197,191,1) 48%, rgba(126,252,247,1) 93%, rgba(29,186,180,1) 100%);
- background: -o-linear-gradient( 135deg, rgba(29,186,180,1) 0%, rgba(227,253,252,1) 17%, rgba(227,253,252,1) 25%, rgba(42,197,191,1) 48%, rgba(126,252,247,1) 93%, rgba(29,186,180,1) 100%);
- background: linear-gradient( 135deg, rgba(29,186,180,1) 0%, rgba(227,253,252,1) 17%, rgba(227,253,252,1) 25%, rgba(42,197,191,1) 48%, rgba(126,252,247,1) 93%, rgba(29,186,180,1) 100%);
- -webkit-background-size: 300% 300%;
- -moz-background-size: 300% 300%;
- -o-background-size: 300% 300%;
- -ms-background-size: 300% 300%;
- background-size: 300% 300%;
- -webkit-animation: bgShine 5s infinite alternate linear;
- -moz-animation: bgShine 5s infinite alternate linear;
- -o-animation: bgShine 5s infinite alternate linear;
- animation: bgShine 5s infinite alternate linear;
- }
- /**/
- /*Animation*/
- /*screenMove01*/
- @-webkit-keyframes screenMove01 {
- 0% {opacity: 0; top: 100%; transform: rotateY(0deg);}
- 100% {opacity: 1; top: 50%; transform: rotateY(-30deg);}
- }
- @-moz-keyframes screenMove01 {
- 0% {opacity: 0; top: 100%; transform: rotateY(0deg);}
- 100% {opacity: 1; top: 50%; transform: rotateY(-30deg);}
- }
- @-o-keyframes screenMove01 {
- 0% {opacity: 0; top: 100%; transform: rotateY(0deg);}
- 100% {opacity: 1; top: 50%; transform: rotateY(-30deg);}
- }
- @keyframes screenMove01 {
- 0% {opacity: 0; top: 100%; transform: rotateY(0deg);}
- 100% {opacity: 1; top: 50%; transform: rotateY(-30deg);}
- }
- /**/
- /*screenMove02*/
- @-webkit-keyframes screenMove02 {
- 0% {transform: rotateY(-30deg);}
- 100% {transform: rotateY(30deg);}
- }
- @-moz-keyframes screenMove02 {
- 0% {transform: rotateY(-30deg);}
- 100% {transform: rotateY(30deg);}
- }
- @-o-keyframes screenMove02 {
- 0% {transform: rotateY(-30deg);}
- 100% {transform: rotateY(30deg);}
- }
- @keyframes screenMove02 {
- 0% {transform: rotateY(-30deg);}
- 100% {transform: rotateY(30deg);}
- }
- /**/
- /*box shine*/
- @-webkit-keyframes boxShine {
- 0% {box-shadow: 0 0 50px #0caba8;}
- 100% {box-shadow: 0 0 200px #0caba8;}
- }
- @-moz-keyframes boxShine {
- 0% {box-shadow: 0 0 50px #0caba8;}
- 100% {box-shadow: 0 0 200px #0caba8;}
- }
- @-o-keyframes boxShine {
- 0% {box-shadow: 0 0 50px #0caba8;}
- 100% {box-shadow: 0 0 200px #0caba8;}
- }
- @keyframes boxShine {
- 0% {box-shadow: 0 0 50px #0caba8;}
- 100% {box-shadow: 0 0 200px #0caba8;}
- }
- /**/
- /*bg shine*/
- @-webkit-keyframes bgShine {
- 0% {-webkit-background-size: 300% 300%;}
- 100% {-webkit-background-size: 100% 100%;}
- }
- @-moz-keyframes bgShine {
- 0% {-moz-background-size: 300% 300%;}
- 100% {-moz-background-size: 100% 100%;}
- }
- @-o-keyframes bgShine {
- 0% {-o-background-size: 300% 300%;}
- 100% {-o-background-size: 100% 100%;}
- }
- @keyframes bgShine {
- 0% {background-size: 300% 300%;}
- 100% {background-size: 100% 100%;}
- }
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
岱庙资源网 Copyright www.zgmyg.com
暂无“css3实例教程 一款纯css3实现的发光屏幕旋转特效”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年11月16日
2024年11月16日
- 第五街的士高《印度激情版》3CD [WAV+CUE][2.4G]
- 三国志8重制版哪个武将智力高 三国志8重制版智力武将排行一览
- 三国志8重制版哪个武将好 三国志8重制版武将排行一览
- 三国志8重制版武将图像怎么保存 三国志8重制版武将图像设置方法
- 何方.1990-我不是那种人【林杰唱片】【WAV+CUE】
- 张惠妹.1999-妹力新世纪2CD【丰华】【WAV+CUE】
- 邓丽欣.2006-FANTASY【金牌大风】【WAV+CUE】
- 饭制《黑神话》蜘蛛四妹手办
- 《燕云十六声》回应跑路:年内公测版本完成95%
- 网友发现国内版《双城之战》第二季有删减:亲亲环节没了!
- 邓丽君2024-《漫步人生路》头版限量编号MQA-UHQCD[WAV+CUE]
- SergeProkofievplaysProkofiev[Dutton][FLAC+CUE]
- 永恒英文金曲精选4《TheBestOfEverlastingFavouritesVol.4》[WAV+CUE]
- 群星《国风超有戏 第9期》[320K/MP3][13.63MB]
- 群星《国风超有戏 第9期》[FLAC/分轨][72.56MB]