div+css实现收音机广播效果代码
代码语言:html
所属分类:布局界面
代码描述: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;
gap: 0.5rem;
justify-content: center;
padding-left: 1rem;
margin-top: 4px;
}
.channel-display::after{
content: '';
position: absolute;
width: 84%;
height: 1px;
background-color: #FFE1A5;
top: 50%;
left: 25px;
}
.tuning-knob{
width: 40px;
height: 40px;
border-radius: 50%;
background-color: black;
position: absolute;
right: 10px;
top: 20%;
}
.tuning-knob::before{
content: 'Tuning';
position: absolute;
left: -50px;
top: 27%;
}
.bottom-part{
width: 97%;
height: 60%;
background-color: #907f5e;
margin: 0 auto;
position: relative;
}
.speaker-area{
width: 72%;
height: 100%;
background-color: rgba(0, 0, 0, 0.699);
}
.circles{
display: flex;
flex-wrap: wrap;
gap: 0.2rem;
align-items: center;
justify-content: center;
padding-top: 3px;
}
.circle{
width: 10px;
height: 10px;
border-radius: 50%;
box-shadow: #000;
background-color: #000;
}
.knob{
position: absolute;
width: 30px;
height: 30px;
border-radius: 50%;
background-color: black;
outline: 3px solid #FFE1A5;
}
.knob-1{
right: 10px;
top: 20px;
}
.knob-2{
right: 10px;
top: 85px;.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0