zoukankan      html  css  js  c++  java
  • css实现发光文字,以及一点点js特效

    效果图:

    代码如下:

    </head>
      <style>
        body{
          background-color:#000;
        }
        .textArea{
          font-size:100px;
          color:#fff;
          text-shadow:0 0 5px #e0ea33,
               0 0 15px #e0ea33,
               0 0 25px #e0ea33;
          margin-top:200px;
          text-align:center;
        }
      </style>

    <body>
      <p class="textArea">帅</p><!--此处是文字内容-->
    </body>

    <script>
      var text=document.querySelector('.textArea');//获取到我们的P标签
      //在鼠标指针进入到P标签上时触发
      text.onmouseenter=function(){
      text.innerHTML='我是你爸爸';//设置P标签之间的 HTML
      };
      //在鼠标指针离开P标签上时触发
      text.onmouseleave=function(){
      text.innerHTML='帅';//设置P标签之间的 HTML
      };

    </script>

    实现思路:

    通过css中的text-shadow来实现文字的发光效果

  • 相关阅读:
    移动端
    移动端
    Jmeter-接口功能测试
    Jmeter-连接 MySQL数据库
    Jmeter-安装与配置
    postman接口功能测试
    移动端
    移动端
    loadrunner实战篇
    【转载】格式化存储装置成为 Ext2/Ext3/Ext4 档案系统
  • 原文地址:https://www.cnblogs.com/wxdmw/p/10716824.html
Copyright © 2011-2022 走看看