单个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: #222;
  text-align: center;
}
div {
  position: absolute;
  left: 50%;
  top: 50%;
}
div:before,
div:after {
  display: block;
  content: '';
  position: absolute;
}
@media (max-width: 400px) {
  div:not(.no-scale) {
    -webkit-transform: scale(0.8);
            transform: scale(0.8);
  }
}
#radio {
  font-size: 10px;
  width: 24em;
  height: 8em;
  margin-left: -12em;
  margin-top: -9em;
  background-repeat: no-repeat;
  background-image: -webkit-gradient(linear, left top, right top, color-stop(50%, #f7f7f7), color-stop(50%, #999)), -webkit-gradient(linear, left top, right top, color-stop(50%, #f7f7f7), color-stop(50%, #999)), -webkit-gradient(linear, left top, right top, color-stop(50%, #ddd), color-stop(50%, #888)), -webkit-gradient(linear, left top, left bottom, from(#ff6347), to(#ff6347)), -webkit-gradient(linear, left top, left bottom, from(#daa520), to(#daa520)), -webkit-gradient(linear, left top, left bottom, from(#daa520), to(#daa520));
  background-image: linear-gradient(to right, #f7f7f7 50%, #999 50%), linear-gradient(to right, #f7f7f7 50%, #999 50%), linear-gradient(to right, #ddd 50%, #888 50%), linear-gradient(#ff6347, #ff6347), linear-gradient(#daa520, #daa520), linear-gradient(#daa520, #daa520);
  background-size: 1em 0.2em, 1em 4.6em, 0.6em 5.5em, 1.5em 4.4em, 1.5em 4.4em, 1.5em 4.4em;
  background-position: 85% 30%, 85% 100%, 84.5% 100%, 70% 100%, 60% 100%, 50% 100%;
  border-radius: 2em 2em 0 0;
  box-shadow: inset 0 -1em 0 #b8860b, inset 0 -2em 0 #ffe4b5, inset 0 0 0 0.3em #a0522d, inset 0 0 0 0.5em #cd853f, inset 0 0 0 0.8em #a0522d, -4em 2.5em 0 -3.5em #a0740a, -4em 3.5em 0 -3.5em #886308, 4em 2.5em 0 -3.5em #a0740a, 4em 3.5em 0 -3.5em #886308, 0 13.6em 0 -3.3em #daa520;
}
#radio:before {
  width: 22.4em;
  height: 14em;
  left: 0.8em;
  top: 4em;
  background-color: #b8860b;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-image: -webkit-gradient(linear, left top, left bottom, from(#ff6347), to(#ff6347)), -webkit-gradient(linear, left top, left bottom, from(#888), to(#888)), repeating-linear-gradient(to right, #888, #888 0.2.........完整代码请登录后点击上方下载按钮下载查看

网友评论0