<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="mystyle.css">
<style>
</style>
<body>
<div>
<div class="circle_box">
<div class="round">
<div class="circle btn"><a>历史</a></div>
<div class="circle_bottom animation "></div>
<div class="circle_bottom2 animation2 "></div>
</div>
<div class="round">
<div class="circle btn"><a>待办</a></div>
<div class="circle_bottom animation "></div>
<div class="circle_bottom2 animation2 "></div>
</div>
</div>
</div>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</body>
</html>
css:
/* * {
margin: 0;
padding: 0;
} */
/*
body {
background: #000735;
font-family: "微软雅黑", Arial;
font-size: 16px;
color: #fff;
overflow: -Scroll;
overflow-x: hidden;
}
.Theme {
width: 1000px;
margin: 0px auto;
} */
/*首页动画*/
.circle_box {
width: 978px;
margin: 50px auto;
height: 317px;
position: relative;
}
.round:nth-child(1) {
/* 大数据 */
position: absolute;
padding: 13px;
left: 0px;
top: 79px;
}
.round:nth-child(2) {
position: absolute;
left: 176px;
top: 0;
padding: 13px;
}
.round:nth-child(3) {
position: absolute;
left: 199px;
top: 199px;
padding: 13px;
}
.round:nth-child(4) {
position: absolute;
left: 348px;
top: 128px;
padding: 13px;
}
/* */
/* .circle a {
font-size: 18px;
line-height: 100px;
color: #000735;
font-weight: bold;
} */
/*.circle {
background: #3a96e1;
border-radius: 100%;
width: 100px;
height: 100px;
z-index: 999;
text-align: center;
top: 18px;
left: 18px;
position: absolute;
}*/
.circle_bottom {
background: rgba(7, 54, 92, 0.4);
width: 100px;
height: 40px;
filter: alpha(opacity=40);
z-index: -100;
position: absolute;
top: 18px;
left: 18px;
}
/* .circle_bottom2 {
background: rgba(58, 150, 225, 0.2);
width: 110px;
height: 110px;
filter: alpha(opacity=20);
z-index: -110;
position: relative;
} */
.animation {
-webkit-animation: twinkling 2.1s infinite ease-in-out;
animation: twinkling 2.1s infinite ease-in-out;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.animation2 {
-webkit-animation: twinkling 2.1s infinite ease-in-out;
animation: twinkling 2.1s infinite ease-in-out;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes twinkling {
0% {
opacity: 0.2;
filter: alpha(opacity=20);
-webkit-transform: scale(1);
}
50% {
opacity: 0.5;
filter: alpha(opacity=50);
-webkit-transform: scale(1.12);
}
100% {
opacity: 0.2;
filter: alpha(opacity=20);
-webkit-transform: scale(1);
}
}
@keyframes twinkling {
0% {
opacity: 0.2;
filter: alpha(opacity=20);
-webkit-transform: scale(1);
}
50% {
opacity: 0.5;
filter: alpha(opacity=50);
-webkit-transform: scale(1.12);
}
100% {
opacity: 0.2;
filter: alpha(opacity=20);
-webkit-transform: scale(1);
}
}

这篇博客展示了如何使用HTML和CSS创建带有动画效果的圆形按钮。内容包括了圆角按钮的样式定义,以及利用动画实现按钮下方的渐变背景动态效果。通过实例代码,读者可以了解到如何将动画应用到网页元素上,增强用户交互体验。

被折叠的 条评论
为什么被折叠?



