zoukankan      html  css  js  c++  java
  • 用Jquery+CSS做动态发光字Keiling_J

    最终效果:

    Jquery 代码如下:

    $(document).ready(function(){
       setInterval(function(){
       // 选择可见图层:
       var versions = $('.textVersion:visible');
       if(versions.length<2){
       // 如果只有一层是可见的就把它显示出来:
         $('.textVersion').fadeIn(1000);
       }
       else{
          // 隐藏
          versions.eq(0).fadeOut(1000);
       }
       },1000);
    });

    CSS代码如下:

    *{
            /*reset原子级类*/
        margin:0;
        padding:0;
    }
    
    body{
        font-size:14px;
        color:#ccc;
        background-color:#141414;
        font-family:Arial, Helvetica, sans-serif;
    }
    
    #neonText span{
        /*控制发光子显示位置的层,这里把用ps做好的png图片设置为改成的背景 并控制显示位置*/
        width:700px;
        height:150px;
        position:absolute;
        left:0;
        top:0;
        background:url('text.png') no-repeat left top;    
    }
    
    span#version1{
        z-index:100;
    }
    
    span#version2{
        background-position:left bottom;
        z-index:99;
    }
    
    
    #neonText{
        height:150px;
        margin:40px 20px 0;
        position:relative;
        width:650px;
        text-indent:-9999px;
    }
    
    a, a:visited {
        color:#0196e3;
        text-decoration:none;
        outline:none;
    }
    
    a:hover{
        text-decoration:underline;
    }

    Html代码:

    <h1 id="neonText">
        <span class="textVersion" id="version1"></span>
            <span class="textVersion" id="version2"></span>
    </h1>

    图片:

    ---By Keiling_J 2013,5,11

  • 相关阅读:
    DNS正向反向解析
    varnish-4.0.5的反向代理 缓存测试 负载均衡实验
    DS8700 硬盘更换略
    ftp虚拟用户
    maven mvn 命令行 编译打包
    linux下的springboot项目启动文件
    linux系统安装gcc
    linux系统下安装两个或多个tomcat
    linux系统的磁盘挂载
    常用linux命令
  • 原文地址:https://www.cnblogs.com/keiling/p/3072301.html
Copyright © 2011-2022 走看看