css实现一个三维旋转的生日蛋糕动画效果代码
代码语言:html
所属分类:动画
代码描述:css实现一个三维旋转的生日蛋糕动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
background: #006bf4;
height: 100vh;
overflow: hidden;
}
.cake {
width: 270px;
height: 270px;
display: flex;
flex-direction: column;
transform-style: preserve-3d;
transform: rotateY(0);
}
.body {
height: 120px;
border-radius: 20px 20px 0 0;
background: #ff0059;
position: relative;
overflow: hidden;
white-space: nowrap;
/* for safari border-radius overflow and transform fix */
-webkit-mask-image: -webkit-radial-gradient(white, black);
}
.tray {
width: 100%;
height: 3px;
background: #cac9c9;
box-shadow: 0px 5px 0px 2px #9E9E9E;
}
.cream {
height: 32px;
background: #fff;
width: 100%;
}
..........完整代码请登录后点击上方下载按钮下载查看
















网友评论0