当前位置:首页 >> 网络编程

基于jQuery制作小图标上下滑动特效

一个小图标特效,挺有趣的,代码也很容易懂。

 jQ小图标上下滑动特效:

基于jQuery制作小图标上下滑动特效

代码如下:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title></title>
  </head>
  <link rel="stylesheet" href="css/normalize.css">
  <style>
   .tubiao{
    width: 300px;
    height: 100px;
    margin: 100px auto;
   }
   a{
    position: relative;
    padding: 10px;
    display: inline-block;
    text-decoration: none;
    color: #000;
    text-align: center;
   }
   i{
    position: absolute;
    left: 5px;
    top: -20px;
    opacity: 1;
   }
  </style>
  <body>
    <div class="tubiao">
      <a href="#"><i><img src="/UploadFiles/2021-04-02/1.png">