一个div+css布局实现时钟收音机效果代码

代码语言:html

所属分类:布局界面

代码描述:一个div+css布局实现时钟收音机效果代码

代码标签: 实现 时钟 收音机 效果

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        body {
          min-height: 300px;
          height: 100vh;
          position: relative;
          background-color: #ccc;
          text-align: center;
        }
        div {
          position: absolute;
          left: 50%;
          top: 50%;
        }
        div:before,
        div:after {
          display: block;
          content: '';
          position: absolute;
          box-sizing: border-box;
        }
        #loop {
          box-sizing: border-box;
          width: 14em;
          height: 4.5em;
          margin-left: -7em;
          margin-top: -2.25em;
          background-color: #444;
          background-repeat: no-repeat;
          background-image: repeating-linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0) 3px, rgba(255,255,255,0.5) 3px, rgba(255,255,255,0.5) 4px), linear-gradient(black, black), linear-gradient(#dc143c, #dc143c), linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)), linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)), linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)), linear-gradient(rgba(255,255,255,0.3), rgba(255,255,255,0.3)), repeating-linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0) 3px, rgba(255,255,255,0.6) 3px, rgba(255,255,255,0.6) 5px, rgba(255,255,255,0) 5px, rgba(255,255,255,0) 7px), linear-gradient(black, black);
          background-size: 0.4em 2em, 1em 2.3em, 0.1em 1.4em, 0.4em 0.1em, 0.4em 0.1em, 3em 0.1em, 3em 0.1em, 5em 0.1em, 5em 2.3em;
          background-position: 1.3em 51.3%, 0.9em 51.5%, 70% 65%, 61% 50%, 61% 60%, 85% 50%, 85% 60%, 90% 73%, 90% 51.3%;
          border-radius: 0.6em;
          border: 3px solid white;
          box-shadow: 0 0 0 2px #aaa, inset 0 0 0 5px #777;
        }
        #loop:before {
          content: '6 00';
          padding: 0.25em 0.3em 0.2em 0.4em;
          display: flex;
          align-items: center;
          left: 1.4em;
          top: 0.56em;
          background-color: black;
          background-repeat: no-repeat;
          background-image: linear-gradient(#444, #444), linear-gradient(#444, #444), linear-gradi.........完整代码请登录后点击上方下载按钮下载查看

网友评论0