CSS 彩虹按钮效果

复制代码
<template>
	<view class="content">
	  <button class="btn">彩虹按钮</button>
	</view>
</template>

<script>

</script>

<style>
	body{
		background-color: #000;
	}
	.content {
		margin-top: 300px;
	
	}

	
	.btn {
	  width: 170px;
	  height: 60px;
	  font-size: 18px;
	  background: #fff;
	  border: none;
	  border-radius: 50px;
	  color: #000;
	  outline: none;
	  cursor: pointer;
	  transition: all 0.4s;
	  align-items: center;
	  display: flex;
	  justify-content: center;
	}
	
	.btn:hover {
	  box-shadow: inset 0 0 0 4px #ef476f, 
	              inset 0 0 0 8px #ffd166, 
	              inset 0 0 0 12px #06d6a0,
	              inset 0 0 0 16px #118ab2;
	  background: #073b4c;
	  color: #fff;
	}
</style>
相关推荐
张较瘦_3 小时前
前端 | CSS animation 与 transform 协同使用完全教程
前端·css
黎明初时3 小时前
React基础框架搭建1-计划:react+router+redux+axios+Tailwind+webpack
前端·react.js·webpack·架构
啃火龙果的兔子3 小时前
edge浏览器设置深色模式
前端·edge
网络风云3 小时前
HTTP协议与Web通信原理
前端·网络协议·http
谷哥的小弟4 小时前
HTML5新手练习项目—个人记账本(附源码)
前端·源码·html5·项目
GISer_Jing4 小时前
2025年FE_Jinger的年度总结、经验分享与展望
前端·经验分享·面试·前端框架·aigc
.try-4 小时前
css直线中间小三角
前端·css·html
Dreamcatcher_AC4 小时前
Node.js留言板开发全流程解析
前端·javascript·mysql·node.js·express
南山安4 小时前
React 学习:useContext——优雅解决跨层级组件通信
javascript·react.js·面试
鹏程十八少4 小时前
Android 一套代码适配车机/手机横竖屏?看我如何用搞定小米、比亚迪、蔚来、理想、多品牌架构设计
android·前端·面试