CSS3打造360探测雷达

HTML代码:

<div class="box">
    <div class=‘circle ‘></div>
    <div class="innerCircle"></div>
    <div class="smallCircle">
        <div class="computer"></div>
    </div>
</div>

CSS代码:

.box{
        width: 400px;
        height: 400px;
        border-radius: 50%;
        border:10px solid rgb(51,121,178);
       /* background:rgba(29,54,80,1);  */
       background: black;
       box-shadow:0 0 0 10px rgb(212,212,212);
       position: relative;
       margin: 30px auto;

    }

    .box:before{
        content:‘‘;
        width: 100%;
        height: 0.5%;
        background:rgb(14,104,200);
        position: absolute;
        top:50%;
        left:0;
    }

    .box:after{
        content:‘‘;
        width: 0.5%;
        height: 100%;
        background:rgb(14,104,200);
        position: absolute;
        top:0;
        left:50%;

    }

  .innerCircle{
         width:300px;
         height: 300px;
         border-radius: 50%;
         background: red;
         border:10px solid rgb(37,92,152);
         background: transparent;
         position: absolute;
         top:40px;
         left: 40px;

    }

   .innerCircle:before{
        content:‘‘;
        width: 10px;
        height: 10px;
        position: absolute;
        border-radius: 50%;
        background: rgba(2,158,203,0);
        top: 20%;
        left: 30%;

        animation:grow .8s ease-in-out  infinite;
        -moz-animation:grow .8s ease-in-out  infinite;
        -o-animation:grow .8s ease-in-out  infinite;
        -webkit-animation:grow .8s ease-in-out  infinite;
        -ms-animation:grow .8s ease-in-out  infinite;
   }

   .innerCircle:after{
        content:‘‘;
        width: 10px;
        height: 10px;
        position: absolute;
        border-radius: 50%;
        background: rgba(2,158,203,0);
        top: 80%;
        right: 60%;

        animation:grow .8s ease-in 0.3s infinite;
        -moz-animation:grow .8s ease-in 0.3s infinite;
        -o-animation:grow .8s ease-in 0.3s infinite;
        -webkit-animation:grow .8s ease-in 0.3s infinite;
        -ms-animation:grow .8s ease-in 0.3s infinite;
   }

   .box .smallCircle{
       width: 150px;
       height: 150px;
       border-radius: 50%;
       position: absolute;
    top:30%;
    left:30%;
       background:transparent;
       z-index: 10000;
       border:6px solid #4baae8;
   }

   .box .smallCircle:after{
        content:‘‘;
        width: 10px;
        height: 10px;
        position: absolute;
        border-radius: 50%;
        background: rgba(2,158,203,0);
        top: 20%;
        right: -20px;

        animation:grow 1.1s linear 1.2s infinite;
        -moz-animation:grow 1.1s linear 1.2s infinite;
        -o-animation:grow 1.1s linear 1.2s infinite;
        -webkit-animation:grow 1.1s linear 1.2s infinite;
        -ms-animation:grow 1.1s linear 1.2s infinite;

   }  

   .computer{
        width: 60%;
        height: 40%;
        background:black;
        border:10px solid rgba(255,255,255,0.9);
     position: relative;
        border-radius: 10%;
        margin:20px auto;

   }
    .computer:before{

       content:‘‘;
       width: 25px;
       height: 10px;
       position: absolute;
       bottom: -24px;
       left: 37%;
       border-radius: 15px 15px 0 0 /10px 10px 0 0 ;
       background: rgba(255,255,255,0.9);

    }
     .computer:after{
           content:‘‘;
       width: 85%;
       height: 10px;
       position: absolute;
       bottom: -40px;
       left:7px;

       border-radius: 15px 15px 0 0 /10px 10px 0 0 ;
       background: rgba(255,255,255,0.9);
     }

    @keyframes grow{
      0%{
          background:rgba(2,158,203,1);
          transform:scale(0);
         -moz-transform:scale(0);
        -webkit-transform:scale(0);
         -o-transform:scale(0);
         -ms-transform:scale(0);

      }
      20%{
          background:rgba(2,158,203,0.8);
        transform:scale(2);
         -moz-transform:scale(2);
        -webkit-transform:scale(2);
         -o-transform:scale(2);
         -ms-transform:scale(2);
      }
      40%{
          background:rgba(2,158,203,0.6);
          transform:scale(4);
         -moz-transform:scale(4);
        -webkit-transform:scale(4);
         -o-transform:scale(4);
         -ms-transform:scale(4);

      }
      60%{
          background:rgba(2,158,203,0.4);
          transform:scale(6);
         -moz-transform:scale(6);
        -webkit-transform:scale(6);
         -o-transform:scale(6);
         -ms-transform:scale(6);

      }
      80%{
          background:rgba(2,158,203,0.2);
          transform:scale(8);
         -moz-transform:scale(8);
        -webkit-transform:scale(8);
         -o-transform:scale(8);
         -ms-transform:scale(8);

      }
      100%{
          background:rgba(2,158,203,0);
              transform:scale(10);
         -moz-transform:scale(10);
        -webkit-transform:scale(10);
         -o-transform:scale(10);
         -ms-transform:scale(10);

      }
    }

     .circle:after{
     content:‘‘;
     position: absolute;
     right: 99px;
     bottom: -100px;
     width: 3px;
     height: 100%;
     background: rgb(41,191,241);
     z-index:-100;

     transform:rotate(90deg);
     -moz-transform:rotate(90deg);
     -webkit-transform:rotate(90deg);
     -o-transform:rotate(90deg);
     -ms-transform:rotate(90deg);
 }   

    .circle{

    width: 400px;
    height: 200px;
    position: relative;
    background-color: #a72525;
      -webkit-border-radius: 200px 200px 0 0;
    -moz-border-radius: 200px 200px 0 0;
    border-radius: 200px 200px 0 0;  

    transform-origin:center bottom;
   -moz-transform-origin:center bottom;
   -webkit-transform-origin:center bottom;
   -ms-transform-origin:center bottom;  

   transform:rotate(-90deg);
   -moz-transform:rotate(-90deg);
   -webkit-transform:rotate(-90deg);
   -ms-transform:rotate(-90deg);
   -o-transform:rotate(-90deg);

    background:-webkit-linear-gradient(27deg,transparent 40%,rgba(2,158,203,0.1),rgba(2,158,203,0.2),rgba(2,158,203,0.3),rgba(2,158,203,0.4),rgba(2,158,203,0.5),rgba(2,158,203,0.6),rgba(2,158,203,0.7),rgba(2,158,203,0.8),rgba(2,158,203,0.9),rgba(2,158,203,1));

    background:-moz-linear-gradient(27deg,transparent 40%,rgba(2,158,203,0.1),rgba(2,158,203,0.2),rgba(2,158,203,0.3),rgba(2,158,203,0.4),rgba(2,158,203,0.5),rgba(2,158,203,0.6),rgba(2,158,203,0.7),rgba(2,158,203,0.8),rgba(2,158,203,0.9),rgba(2,158,203,1));

    background:-o-linear-gradient(27deg,transparent 40%,rgba(2,158,203,0.1),rgba(2,158,203,0.2),rgba(2,158,203,0.3),rgba(2,158,203,0.4),rgba(2,158,203,0.5),rgba(2,158,203,0.6),rgba(2,158,203,0.7),rgba(2,158,203,0.8),rgba(2,158,203,0.9),rgba(2,158,203,1));

             -moz-animation:whirl 1.5s linear infinite;
             -webkit-animation:whirl 1.5s linear infinite;
             -o-animation:whirl 1.5s linear infinite;
             -ms-animation:whirl 1.5s linear infinite;
             animation:whirl 1.5s linear infinite;   

    }

    @-moz-keyframes whirl{

         0%{transform:rotate(0deg)}

        100%{transform:rotate(360deg)}
    }

    @-webkit-keyframes whirl{

        0%{transform:rotate(0deg)}

        100%{transform:rotate(360deg)}
    }
     @-o-keyframes whirl{

        0%{transform:rotate(0deg)}

        100%{transform:rotate(360deg)}
    }

    @-ms-keyframes whirl{

    0%{transform:rotate(0deg);}

        100%{transform:rotate(360deg)}
    }
     @keyframes whirl{

        0%{transform:rotate(0deg)}

        100%{transform:rotate(360deg)}
    }

效果图:

比较多的使用了:before,:after伪类,减少了不少结构;

firefox,chrome,opera下完美运行,IE下渐变滤镜问题没有解决(解决了更新代码);

时间: 2024-08-04 10:08:32

CSS3打造360探测雷达的相关文章

贪心 Radar Installation (求最少探测雷达)

Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, locating on the coasting, can only cover d distance, s

【Web前沿技术】纯 CSS3 打造的10个精美加载进度条动画

之前向大家介绍8款优秀的 jQuery 加载动画和进度条插件,今天这篇文章向大家推荐10个纯 CSS3 代码实现精美加载进度条动画效果的方案.加载动画和进度条在网站和 Web 应用中的使用非常流行,特别是在使用 Ajax 技术加载内容的应用场景中,使用时尚的加载动画和进度条告诉用户内容正在加载中是一种非常友好的方式. 您可能感兴趣的相关文章 20个非常绚丽的 CSS3 特性应用演示 23个纯 CSS3 打造的精美LOGO图案 35个让人惊讶的 CSS3 动画效果演示 推荐12个漂亮的 CSS3

纯CSS3打造七巧板

原文:纯CSS3打造七巧板 最近项目上要制作一个七巧板,脑子里瞬间闪现,什么...七巧板不是小时候玩的吗... 七巧板的由来 先来个科普吧,是我在查资料过程中看到的,感觉很有意思. 宋朝有个叫黄伯思的人,对几何图形很有研究,他热情好客,发明了一种用6张小桌子组成的“宴几”——请客吃饭的小桌子.后来有人把它改进为7张桌组成的宴几,可以根据吃饭人数的不同,把桌子拼成不同的形状,比如3人拼成三角形,4人拼成四方形,6人拼成六方形……这样用餐时人人方便,气氛更好.后来,有人把宴几缩小改变到只有七块板,用

纯CSS3打造非常炫的加载动画

纯css3打造的一款非常炫的加载图.用在需要一定时间加载的地方非常合适.先上效果图: 点击这里在线预览 代码非常简单.没有用任何javascript代码.纯css3实现. html代码: <div class="content"> <div style="width: 970px; margin: auto"> </div> <div class="rotate"> <span class=&

CSS3打造的超酷的多级扇形菜单

<!DOCTYPE HTML> <html lang=zh-cn> <head> <meta charset=utf-8> <title>CSS3打造的超酷的多级扇形菜单丨梨花粉丨石家庄学前教育</title> <style> *{margin:0px;padding:0px;} body{background:#b1b1b1;margin:0px;padding:0px;font-size:14px;color:#000

html5和css3打造一款创意404页面

之前和网友分享一款HTML5可爱的404页面动画 很逗的机器人.今天要爱编程小编要再给大家带来一款html5和css3打造的创意404页面.一起看下效果图吧: 在线预览   源码下载 实现的代码. html代码: <svg class="me404" viewbox="0 0 1000 480"> <path id="cloud" class="st0" d="M658.4,345.2c-10.9,

使用 CSS3 打造一组质感细腻丝滑的按钮

CSS3 引入了众多供功能强大的新特性,让设计和开发人员能够轻松的创作出各种精美的界面效果.下面这些发出闪亮光泽的按钮,很漂亮吧?把鼠标悬停在按钮上,还有动感的光泽移动效果. 温馨提示:为保证最佳的效果,请在 IE10+.Chrome.Firefox 和 Safari 等现代浏览器中浏览. 源码下载     在线演示 这些精美的效果用到了 CSS3 RGBA.box-shadow(阴影).border-radius(边框圆角)和 linear-gradient(线性渐变),为了便于阅读,精简后的

[原创]jquery+css3打造一款ajax分页插件

最近公司的项目将好多分页改成了ajax的前台分页以前写的分页插件就不好用了,遂重写一个 支持IE6+,但没有动画效果如果没有硬需求,个人认为没必要多写js让动画在这些浏览器中实现css3的动画本来就是帮我们取代js中这部分动画代码的使js更纯粹地去实现逻辑 效果图如下: 调用代码如下: 包括常用的加载失败重试,参数可配置是否能手动输入页码,设置按钮数目,可以调用多个page等等,调用代码很简便 <script type="text/javascript"> var kpag

纯css3打造瀑布流布局

纯css3打造瀑布流布局 原理: 1.column-count 把div中的文本分为多少列 2.column-width 规定列宽 3.column-gap 规定列间隙 4.break-inside: avoid; 避免元素内部断行并产生新列 注意: Internet Explorer 9及更早 IE 版本浏览器不支持 column-count 属性. 进阶参考: 原理: http://www.zhangxinxu.com/wordpress/?p=2308 效果:http://www.zhan