继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

css动画

拿拿yoo
关注TA
已关注
手记 4
粉丝 1
获赞 5

1. 💯呼吸灯效果

html

<div class="breathe-btn"></div>

css

/*resize*/
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,form,input,textarea,p,th,td,menu {
	margin:0;
	padding:0;
}
body {
	font-size:12px;
	-webkit-text-size-adjust:none;
	font-family:Arial,Helvetica,sans-serif;
}
img {
	border:none;
}
ol,ul {
	list-style:none;
}
em {
	font-style:normal;
}
a {
	text-decoration:none;
}
.clearfix {
	#zoom:1;
}
.clearfix:after {
	content:' ';
	display:block;
	height:0;
	clear:both;
	color:#fff;
}
body {
	background:#333;
}
.breathe-btn {
	position:relative;
	width:100px;
	height:10px;
	margin:40px auto;
	line-height:40px;
	border:1px solid #2b92d4;
	border-radius:5px;
	color:#fff;
	font-size:20px;
	text-align:center;
	cursor:pointer;
	box-shadow:0 1px 2px rgba(0,0,0,.3);
	overflow:hidden;
	background-image:-webkit-gradient(linear,left top,left bottom,from(#6cc3fe),to(#21a1d0));
	-webkit-animation-timing-function:ease-in-out;
	-webkit-animation-name:breathe;
	-webkit-animation-duration:2700ms;
	-webkit-animation-iteration-count:infinite;
	-webkit-animation-direction:alternate;
}
@-webkit-keyframes breathe {
	0% {
	opacity:.2;
	box-shadow:0 1px 2px rgba(255,255,255,0.1);
}
100% {
	opacity:1;
	border:1px solid rgba(59,235,235,1);
	box-shadow:0 1px 30px rgba(59,255,255,1);
}
}

2. 💯不规则阴影filter

<div>Rabbit</div>
div {
    text-align: center;
    line-height: 200px;
    font-size: 40px;
    color: #cffdf8;
    width: 200px;
    height: 200px;
    position: relative;
    background: #216583;
    border-radius: 20px;
    filter: drop-shadow(2px 2px 10px rgba(0,0,0,.6));
}
div:after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    background: #216583;
    position: absolute;
    z-index: -999;
    right: -15px;
    top: 20%;
    transform:rotate(45deg);
}

3. 💯20个专业H5(HTML5)动画工具推荐
https://www.cnblogs.com/ChenChunChang/p/8268780.html

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP