当前位置:网站首页>box-shadow实现一个按钮
box-shadow实现一个按钮
2022-08-05 21:33:00 【richest_qi】
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style> *, *:before, *:after{
box-sizing: border-box } body{
margin: 0; padding: 30px; background: #f8f8f8; min-height: 100vh; display: flex; align-items: center; justify-content: center; } .grid{
max-width: 400px; margin: 0 auto; display: grid; grid-template-columns: 150px 150px 50px; align-items: center; justify-content: center; grid-gap: 40px 25px; } button{
-webkit-appearance: none; user-select: none; display: flex; align-items: center; justify-content: center; outline: none; cursor: pointer; width: 150px; height: 50px; background-image: linear-gradient(to top, #D8D9DB 0%, #fff 80%, #FDFDFD 100%); border-radius: 30px; border: 1px solid #8F9092; box-shadow: 0 4px 3px 1px #FCFCFC, 0 6px 8px #D6D7D9, 0 -4px 4px #CECFD1, 0 -6px 4px #FEFEFE, inset 0 0 3px 0 #CECFD1; transition: all .2s ease; font-family: "Source Sans Pro", sans-serif; font-size: 14px; font-weight: 600; color: #606060; text-shadow: 0 1px #fff; } button:hover{
box-shadow: 4px 3px 1px #FCFCFC, 0 6px 8px #D6D7D9, 0 -4px 4px #CECFD1, 0 -6px 4px #FEFEFE, inset 0 0 3px 3px #CECFD1; } button:focus{
animation: active .9s alternate infinite; outline: none; } button:active{
box-shadow: 4px 3px 1px #FCFCFC, 0 6px 8px #D6D7D9, 0 -4px 4px #CECFD1, 0 -6px 4px #FEFEFE, inset 0 0 5px 3px #999, inset 0 0 30px #aaa; } </style>
</head>
<body>
<div class="grid">
<button>点我一下</button>
</div>
</body>
</html>

相关链接:【css】box-shadow
边栏推荐
猜你喜欢
随机推荐
龙蜥社区首推“分层分类”顶设 发展以云为终态的开源产业创新生态
Experience golang1.18 generics
glog使用
【apt time reached】error while loading shared libraries:libxxxx.so.xx.xx,共享库文件找不到,解决办法
2022-08-05 第五小组 顾祥全 学习笔记 day29-集合
File/data synchronization record between new and old computers
五、kubeadm高可用
The pits and shortcomings encountered during the installation of kong and konga
第12章_数据库其它调优策略
使用cpolar优化树莓派上的网页(4)
centos 安装mysql7
phpstyle安装管理mysql
Flexible and easy-to-use sql monitoring script part3
同花顺开户炒股安全吗?
Technology Insider | StarRocks Community Champion and Alibaba Cloud technical experts interpret the implementation of Optimizer
中国石油大学(北京)-《 油气藏经营管理》第一阶段在线作业
dre_slam
内核线程的fork与普通的fork的区别
Pytest学习-Fixture参数
docker安装postgresql数据库









