肥宅综合社区-做一个优雅文明的综合社区

搜索内容

网站左上角logo图片扫光动态css代码分享源码

2023-10-05 200阅读 0评论

网站左上角logo图片扫光动态css代码分享源码
左上角logo有扫光,有的朋友可能以为是gif动态图片,其实是用css代码弄的, 以下是代码分享,需要的朋友自取

  1. /*扫光开始*/
  2. .header-logo {position:relative;float:left;margin-right:10px;padding:5px 0;overflow: hidden;}
  3. .header-logo  a:before{
  4. content:"";
  5. position: absolute;
  6. left: -665px;
  7. top: -460px;
  8. width: 200px;
  9. height: 15px;
  10. background-color: rgba(255,255,255,.5);
  11. -webkit-transform: rotate(-45deg);
  12. -moz-transform: rotate(-45deg);
  13. -ms-transform: rotate(-45deg);
  14. -o-transform: rotate(-45deg);
  15. transform: rotate(-45deg);/*角度倾斜45*/
  16. -webkit-animation: searchLights 1s ease-in 1s infinite;
  17. -o-animation: searchLights 1s ease-in 1s infinite;
  18. animation: searchLights 2s ease-in 2s infinite;/*光扫过去的时间,自己修改,可以加快*/}
  19. @-webkit-keyframes searchLights {
  20. 0% { left: -100px; top: 0; }
  21. to { left: 120px; top: 100px; }
  22. }
  23. @-o-keyframes searchLights {
  24. 0% { left: -100px; top: 0; }
  25. to { left: 120px; top: 100px; }
  26. }
  27. @-moz-keyframes searchLights {
  28. 0% { left: -100px; top: 0; }
  29. to { left: 120px; top: 100px; }
  30. }
  31. @keyframes searchLights {
  32. 0% { left: -100px; top: 0; }
  33. to { left: 120px; top: 100px; }
  34. }
  35. /*扫光结束*/

文章版权声明:本站部分内容系网络转载,如果文章触发到您的利益或版权,请联系本站客服邮箱kefu@fz331.com删除,我们将48小时之内删除。

发表评论

上传附件:
评论列表 (有 0 条评论,200人围观)
切换注册

登录

忘记密码?

切换登录

注册

验证码