screenshots.gif

html

  
  <div id="fff">
    
    
    <input type="text" id="www" placeholder="搜索">
  
    
  </div>
  
  




CSS

#fff:after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 4px;
    background: linear-gradient(to right, #04f3ff, #08ffc6, #ddf730, #ffbd19, #ff1fe0, #c418ff, #04f3ff);
    background-size: 200%;
    animation: glow 10s linear infinite;
}
#www {
    width: 100%;
    padding: 0.5rem 0;
  
  
}




#fff {
    position: sticky;
  
  
}



@keyframes glow {
  from {
    background-position: 0%;
  }
  to {
    background-position: 1000%;
  }
}