div+css实现飞机订票按钮悬浮变形成飞机动画效果代码
代码语言:html
所属分类:悬停
代码描述:div+css实现飞机订票按钮悬浮变形成飞机动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap" rel="stylesheet">
<style>
:root {
--wingRadius: 0px;
--dkBlue: #147ff8;
--ltBlue: #549ff9;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: grid;
justify-content: center;
align-items: center;
min-height: 100vh;
overflow: hidden;
}
i {
font-size: 2.5em;
padding: 0;
margin: 0;
}
#button-container {
position: relative;
}
#button-container button {
border-radius: 10px;
font-size: 1.25em;
font-family: "Montserrat", sans-serif;
position: relative;
transition: all 0.4s ease-in-out;
cursor: pointer;
transform-origin: center center;
border-color: #004ab2;
}
#button-container button span {
display: block;
padding: 10px 50px;
position: relative;
z-index: 100;
border-radius: 10px;
transition: all 0.4s ease-in-out;
background-color: #e1effe;
background: linear-gradient(to bottom, #e1effe 0%, rgba(179, 221, 253, 0.65) 50%, #e1effe 100%);
text-transform: uppercase;
border-color: #004ab2;
color: #004ab2;
font-weight: 700;
}
#button-container button .tail {
position: absolute;
left: -5px;
top: 0;
bottom: 0;
margin: auto;
height: 5px;
width: 0px;
z-index: 100;
background-color: var(--dkBlue);
transform-origin: right center;
transition: all 0.4s ease-in-out;
}
#button-container button .tail:before {
content: "";
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 0px;
background-color: var(--ltBlue);
transform-origin: right center;
transition: all 0.4s ease-in-out;
}
#button-container button .windows {
position: absolute;
display: flex;
justify-content: space-between;
width: 100px;
left: 35%;
margin: auto;
z-index: 111;
}
#button-container button .windows i {
border-radius: 5px;
width: 0px;
height: 10px;
background-color: var(--ltBlue);
transition: all 0.4s ease-in-out;
transform-origin: center center;
}
#button-container button .windows.left {
top: 3px;
}
#.........完整代码请登录后点击上方下载按钮下载查看
网友评论0