css实现闹钟摇动动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现闹钟摇动动画效果代码

代码标签: css 闹钟 摇动 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
  
<style>
.shake {
  width: 100px;
  aspect-ratio: 1;
  color: #ce0800;
  border: 14px solid;
  border-radius: 50%;
  position: relative;
  background: 
    radial-gradient(circle 6px, #000 90%,#0000),
    linear-gradient(180deg,#000 50%,#0000 0) center/5px 70%,
    linear-gradient(90deg ,#000 50%,#0000 0) center/50% 5px;
  background-repeat: no-repeat;
  animation: shake 1s infinite;
}
.shake:before, 
.shake:after {
  content: "";
  position: absolute;
  border-radius: 40px 40px 0 0;
  inset: -40px calc(50% - 20px);
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0