博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
按钮3D分层悬停效果
阅读量:2054 次
发布时间:2019-04-28

本文共 3201 字,大约阅读时间需要 10 分钟。

按钮3D分层悬停效果

纯css3实现

在这里插入图片描述

  • index.html
      
Document
  • style.css
* {
margin: 0; padding: 0; box-sizing: border-box; font-family: "Poppins", sans-serif;}html,body {
display: grid; height: 100%; place-items: center; background: #000;}.icons {
display: inline-flex;}.icons a {
margin: 0 25px; text-decoration: none; color: #fff; display: block; position: relative;}.icons a .layer {
width: 55px; height: 55px; transition: transform 0.3s;}.icons a:hover .layer {
transform: rotate(-35deg) skew(20deg);}.icons a .layer span {
position: absolute; top: 0; left: 0; height: 100%; width: 100%; border: 1px solid #fff; border-radius: 5px; transition: all 0.3s;}.icons a .layer span.fab {
font-size: 30px; line-height: 55px; text-align: center;}.icons a:hover .layer span:nth-child(1) {
opacity: 0.2;}.icons a:hover .layer span:nth-child(2) {
opacity: 0.4; transform: translate(5px, -5px);}.icons a:hover .layer span:nth-child(3) {
opacity: 0.6; transform: translate(10px, -10px);}.icons a:hover .layer span:nth-child(4) {
opacity: 0.8; transform: translate(15px, -15px);}.icons a:hover .layer span:nth-child(5) {
opacity: 1; transform: translate(20px, -20px);}.icons a:nth-child(1) .layer span,.icons a:nth-child(1) .text {
color: #4267b2; border-color: #4267b2;}.icons a:nth-child(2) .layer span,.icons a:nth-child(2) .text {
color: #1da1f2; border-color: #1da1f2;}.icons a:nth-child(3) .layer span,.icons a:nth-child(3) .text {
color: #e1306c; border-color: #e1306c;}.icons a:nth-child(4) .layer span,.icons a:nth-child(4) .text {
color: #2867b2; border-color: #2867b2;}.icons a:nth-child(5) .layer span,.icons a:nth-child(5) .text {
color: #ff0000; border-color: #ff0000;}.icons a:nth-child(1) .layer span {
box-shadow: -1px 1px 3px #4267b2;}.icons a:nth-child(2) .layer span {
box-shadow: -1px 1px 3px #1da1f2;}.icons a:nth-child(3) .layer span {
box-shadow: -1px 1px 3px #e1306c;}.icons a:nth-child(4) .layer span {
box-shadow: -1px 1px 3px #4267b2;}.icons a:nth-child(5) .layer span {
box-shadow: -1px 1px 3px #ff0000;}.icons a .text {
position: absolute; height: 30px; left: 50%; bottom: -5px; opacity: 0; transform: translate(-50%); transition: bottom 0.3s ease, opacity 0.3s ease;}.icons a:hover .text {
bottom: -35px; opacity: 1;}

转载地址:http://lcclf.baihongyu.com/

你可能感兴趣的文章
使用 ebpf 深入分析容器网络 dup 包问题
查看>>
Kubelet 中的 “PLEG is not healthy” 到底是个什么鬼?
查看>>
超详细的网络抓包神器 Tcpdump 使用指南
查看>>
从 Kubernetes 资源控制到开放应用模型,控制器的进化之旅
查看>>
从此以后运维与开发过上了没羞没臊的性福生活
查看>>
教你如何优雅地魔改 Grafana 主题,太实用了!
查看>>
让我们来看看回到单体的 Istio 到底该怎么部署
查看>>
超详细的网络抓包神器 tcpdump 使用指南
查看>>
iTerm2 都不会用,还敢自称老司机?(上)
查看>>
两个奇技淫巧,将 Docker 镜像体积减小 99%
查看>>
Istio 1.5 部署指南修正版
查看>>
不要轻易使用 Alpine 镜像来构建 Docker 镜像,有坑!
查看>>
Kubectl exec 背后到底发生了什么?
查看>>
程序员涨薪宝典
查看>>
什么?终止一个容器竟然用了 10 秒钟,这不能忍!
查看>>
Openshift 4.4 静态 IP 离线安装系列(一):准备离线资源
查看>>
万字长文,说透了 Openshift4 的安装过程!
查看>>
Envoy 中文指南系列:Envoy 介绍
查看>>
[译] BeyondProd:云原生安全的一种新方法(Google, 2019)
查看>>
什么?VMware Fusion 也能 docker run 了?
查看>>