美文网首页
实心圆往外扩散

实心圆往外扩散

作者: 不想起床_9a42 | 来源:发表于2019-12-31 10:16 被阅读0次

    @keyframes warn {

    0% {

    transform: scale(0.3);

    -webkit-transform: scale(0.3);

    opacity: 0.0;

    }

    25% {

    transform: scale(0.3);

    -webkit-transform: scale(0.3);

    opacity: 0.1;

    }

    50% {

    transform: scale(0.5);

    -webkit-transform: scale(0.5);

    opacity: 0.3;

    }

    75% {

    transform: scale(0.8);

    -webkit-transform: scale(0.8);

    opacity: 0.5;

    }

    100% {

    transform: scale(1);

    -webkit-transform: scale(1);

    opacity: 0.0;

    }

    }

    @keyframes warn1 {

    0% {

    transform: scale(0.3);

    -webkit-transform: scale(0.3);

    opacity: 0.0;

    }

    25% {

    transform: scale(0.3);

    -webkit-transform: scale(0.3);

    opacity: 0.1;

    }

    50% {

    transform: scale(0.3);

    -webkit-transform: scale(0.3);

    opacity: 0.3;

    }

    75% {

    transform: scale(0.5);

    -webkit-transform: scale(0.5);

    opacity: 0.5;

    }

    100% {

    transform: scale(0.8);

    -webkit-transform: scale(0.8);

    opacity: 0.0;

    }

    }

    .container {

    position: relative;

    width: 120px;

    height: 120px;

    left: 10px;

    top: 10px;

    }

    /* 保持大小不变的小圆点 */

    .dot {

    position: absolute;

    width: 49px;

    height: 49px;

    left: 134px;

    top: 134px;

    -webkit-border-radius: 50%;

    -moz-border-radius: 50%;

    border: 1px solid #33ccff;

    border-radius: 50%;

    background-color:#33ccff; /* 实心圆 ,如果没有这个就是一个小圆圈 */

    z-index: 2;

    }

    /* 产生动画(向外扩散变大)的圆圈 第一个圆 */

    .pulse {

    position: absolute;

    width: 77px;

    height: 77px;

    left: 120px;

    top: 120px;

    border: 1px solid #3399ff;

    -webkit-border-radius: 50%;

    -moz-border-radius: 50%;

    border-radius: 50%;

    z-index: 1;

    opacity: 0;

    -webkit-animation: warn 2s ease-out;

    -moz-animation: warn 2s ease-out;

    animation: warn 2s ease-out;

    -webkit-animation-iteration-count: infinite;

    -moz-animation-iteration-count: infinite;

    animation-iteration-count: infinite;

    box-shadow: 1px 1px 30px #3399ff; /* 阴影效果 */

    }

    /* 产生动画(向外扩散变大)的圆圈 第二个圆 */

    .pulse1 {

    position: absolute;

    width: 77px;

    height: 77px;

    left: 120px;

    top: 120px;

    border: 1px solid #3399ff;

    -webkit-border-radius: 50%;

    -moz-border-radius: 50%;

    border-radius: 50%;

    z-index: 1;

    opacity: 0;

    -webkit-animation: warn1 2s ease-out;

    -moz-animation: warn1 2s ease-out;

    animation: warn1 2s ease-out;

    -webkit-animation-iteration-count: infinite;

    -moz-animation-iteration-count: infinite;

    animation-iteration-count: infinite;

    box-shadow: 1px 1px 30px #3399ff; /* 阴影效果 */

    }

    </style>

    </head>

    <body>

    由实心圆点向四周扩散(有阴影)

    <div class="container">

    <div class="dot"></div>

    <div class="pulse"></div>

    <div class="pulse1"></div>

    </div>

    相关文章

      网友评论

          本文标题:实心圆往外扩散

          本文链接:https://www.haomeiwen.com/subject/hestwctx.html