css实现按钮悬浮弹出详细内容效果代码
代码语言:html
所属分类:悬停
代码描述:css实现按钮悬浮弹出详细内容效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Lato);
body {
display: -webkit-box;
display: flex;
height: 100vh;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
font-family: Lato, sans-serif;
background: #ECEFFC;
}
.shadow {
-webkit-filter: drop-shadow(-2px 2px 8px rgba(50, 50, 0, 0.5));
filter: drop-shadow(-2px 2px 8px rgba(50, 50, 0, 0.5));
}
.card {
-webkit-clip-path: inset(0 0 70% 0);
clip-path: inset(0 0 70% 0);
-webkit-transform: translateY(30%);
transform: translateY(30%);
-webkit-transition: 0.5s ease;
transition: 0.5s ease;
}
.card .card-header {
display: -webkit-box;
display: flex;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
width: 400px;
height: 100px;
font-size: 2em;
color: white;
background-color: #2979ff;
-webkit-clip-path: inset(0 19% 0 19%);
clip-path: inset(0 19% 0 19%);
-webkit-transition: 0.5s ease;
transition: 0.5s ease;
}
.card .card-body {
box-sizing: border-box;
padding: 1.25em;
width: 400px;
height: 225px;
font-size: 1.5em;
background: white;
-webkit-clip-path: inset(0 19% 0 19%);
clip-path: inset(0 19% 0 19%);
-webkit-transition: 0.5s ease;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0