炫酷的按钮

炫酷的按钮

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.search-ok {
      
      
			    width: 200px;
			    height: 30px;
			    line-height: 30px;
			    background-image: linear-gradient(90deg, #03A9F4, #F441A5, #FFEB3B, #03A9F4);
			    background-size: 400%;
			    color: white;
			    border: none;
			    border-radius: 5px;
			    font-size: 16px;
			  }
			
			  .search-ok:hover {
      
      
			    animation: animate 8s linear infinite;
			  }
			
			  @keyframes animate {
      
      
			    0% {
      
      
			      background-position: 0%;
			    }
			
			    100% {
      
      
			      background-position: 400%;
			    }
			  }
		</style>
	</head>
	<body>
		<button class="search-ok">我很炫酷</button>
	</body>
</html>

在这里插入图片描述
鼠标移上去的时候,会动态的变化颜色

猜你喜欢

转载自blog.csdn.net/qq_41880073/article/details/119171157