div+css实现收音机广播效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现收音机广播效果代码

代码标签: div css 收音机 广播

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
*{
    box-sizing: border-box;
    border: 0;
    margin: 0;
}

body{
    background-color: #FDD17A;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

h1{
    margin-bottom: 7%;
    text-transform: uppercase;
    font-family: monospace;
    font-size: 2rem;
    font-weight: bold;

}



.container{
    width: 400px;
    height: 250px;
    background-color: #907f5e;
    border: 10px solid black;
    border-radius: 10px;
    position: relative;
}

.antenna{
    position: absolute;
    height: 70px; 
    width: 5px;
    background-color: #E7E7E7;
    right: 15px;
    top: -125%;
    z-index: -1;
  }

  .antenna::before{
      content: '';
      height: 10px;
      width: 10px;
      right: -2px;
      border-radius: 20%;
      background-color: gainsboro;
      position: absolute;
  }

  .antenna::after{
    content: '';
    position: absolute;
    height: 20px;
    width: 150%;
    right: -30%;
    bottom: 0;
    background-color: gray;
  }


.tuning-container{
    position: relative;
    width: 98%;
    height: 70px;
    background-color: #FFE1A5;
    margin: 10px auto;
    position: relative;
    border-radius: 5px;
}

.tuning-container::after{
    content: '';
    position: absolute;
    border: 3px solid black;
    width: 97%;
    height: 70%;
    top:7px;
    left: 3px;

}

.channel-display{
    width: 68%;
    height: 38px;
    background-color: #000;
    position: absolute;
    top: 15px;
    left: 10px;
    border-radius: 10px;
   
}

.frequency{
    color: #FFE1A5;
    position: absolute;
    top: 25%;
    left: 17%;
  
}

.AM-PM{
    color: #FFE1A5;
    font-size: 0.6rem;
    display: flex;
    flex-direction: column;
    ga.........完整代码请登录后点击上方下载按钮下载查看

网友评论0