css+js实现自适应联系人电话拨号打电话 ui效果代码

代码语言:html

所属分类:其他

代码描述:css+js实现自适应联系人电话拨号打电话 ui效果代码

代码标签: css js 自适应 联系人 电话 拨号 打电话 ui

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

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

<head>
  <meta charset="UTF-8">
  

  
  
  <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
<style>


section.controls,
.numblock, aside, .display .delete, .display .add, .display .number {
  user-select: none;
  -moz-user-select: none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
}

/* basic settings */
html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

img[src="Error.src"] {
  display: none;
}

html, body {
  width: 100%;
  height: 100%;
}

body {
  background-color: #8860b5;
  font-family: sans-serif;
}
body:after {
  content: "";
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;

  opacity: 0.2;
}

/**/
.ui-box, aside, .dailer {
  height: 100%;
  position: relative;
  z-index: 2;
}

.dailer ul {
  margin: 0 auto;
}
.dailer ul:after {
  clear: both;
  display: table;
  content: "";
}

.display {
  height: 20vh;
  max-width: 26.25em;
  width: 100%;
  padding: 0 4.5em;
  overflow: hidden;
  margin: 0 auto;
  position: relative;
}
.display .number {
  color: #63d91c;
  text-align: center;
  line-height: 20vh;
  font-size: 5vh;
  overflow: hidden;
  margin: 0 auto;
}
.display .delete, .display .add {
  position: absolute;
  top: 50%;
  transform: translate(0, -50%);
  color: #b2b2b2;
  cursor: pointer;
  border-radius: 50%;
  border: 1px solid #fff;
  width: 4vh;
  height: 4vh;
  line-height: 3.5vh;
  font-size: 2vh;
  text-align: center;
  transition: border-color 0.2s ease-in;
}
.display .delete:hover, .display .delete:focus, .display .delete:active, .display .add:hover, .display .add:focus, .display .add:active {
  border-color: #63d91c;
}
.display .add {
  left: 1.5em;
}
.display .delete {
  right: 1.5em;
}

.more {
  display: none;
}

.dail-cancel,
.dail {
  margin: 0 auto;
  padding: 0 2vh;
  display: block;
  height: 10vh;
  width: 10vh;
}

.dail-cancel {
  position: absolute;
  left: 50%;
  margin-left: -5vh;
  bottom: 4vh;
}

figure {
  height: 100%;
  background: #ccc;
  width: 5.625em;
  left: 0;
  position: absolute;
}

figure .fa {
  color: #fff;
  width: 5.625em;
  height: 100%;
  background: #63d91c;
  position: absolute;
  left: 0;
  top: 0;
  text-align: center;
  line-height: 5.625em;
}

/* the contact list */
aside {
  font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  background: rgba(0, 0, 0, 0.2);
  padding: 1.25em 0.938em;
}
aside li {
  margin: 0 0 1.25em 0;
  cursor: pointer;
}
aside li:last-child {
  margin-bottom: 0;
}
aside div {
  position: relative;
  background: #fff;
  padding: 0 0 0 5.625em;
  min-height: 5.625em;
  box-shadow: 8px 40px 80px -10px rgba(0, 0, 0, 0.75);
  cursor: pointer;
}
aside label {
  padding: 1.563em;
  display: block;
  cursor: pointer;
}
aside img {
  height: 100%;
}
aside strong, aside a {
  display: block;
}
aside strong {
  font-weight: 300;
  color: #666;
  padding-bottom: 0.25em;
}
aside .hit {
  color: #63d91c;
}
aside a {
  color: #b3b3b3;
  text-decoration: none;
}

.dailer {
  background: #fff;
  padding-bottom: 4vh;
}

ul {
  list-style-type: none;
}

button {
  border: 0;
  border-radius: 50%;
  outline: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  height: 13vh;
  width: 13vh;
}
button strong, button span {
  display: block;
}

button::-moz-focus-inner {
  padding: 0;
  border: 0;
}

section.controls,
.numblock {
  width: 100%;
  max-width: 26.25em;
  margin: 0 auto;
  padding: 0 0 1vh 0;
  overflow: hidden;
}
section.controls button,
.numblock button {
  transition: background 0.2s ease-in;
}
section.controls button:hover, section.controls button:focus, section.controls button:active,
.numblock button:hover,
.numblock button:focus,
.numblock button:active {
  background: #ededed;
}
section.controls li,
.numblock li {
  width: 33.33%;
  float: left;
  text-align: center;
  height: 15vh;
  position: relative;
}
section.controls li strong,
.numblock li strong {
  font-size: 6vh;
  font-weight: 300;
  color: #666;
  padding-bottom: 3vh;
}
section.controls li .secondary,
.numblock li .secondary {
  position: absolute;
  width: 100%;
  left: 0;
  bottom: 4vh;
  text-align: center;
  height: 3vh;
  font-size: 2vh;
  color: #b3b3b3;
}

.avatar {
  background: #eee;
  width: 5.625em;
  height: 5.625em;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translate(-50%, 0);
  overflow: hidden;
  transform-origin: 50% 50%;
}
.avatar img {
  -webkit-filter: grayscale(100%);
}
.avatar:after {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  content: "";
  background: #ccc;
  border-radius: 50%;
  z-index: 2;
  -webkit-animation: doubleBounce 2s infinite ease-in-out;
  animation: doubleBounce 2s infinite ease-in-out;
}

.calling.vis {
  z-index: 2;
  opacity: 1;
  max-height: 100%;
  -moz-transform-origin: 0 0;
  transform-origin: 0 0;
}

.calling {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: -1;
  opacity: 0;
  max-height: 0;
  transition: background 0.3s ease;
}
.calling p.info {
  padding-top: 6em;
  text-align: center;
  line-height: 10vh;
  color: #666;
}

.numblock .fa {
  font-size: 4vh;
}

.dail .fa {
  color: #63d91c;
  font-size: 10vh;
}

.dail-cancel .fa {
  color: #ec2218;
  transform: rotate(135deg);
  font-size: 10vh;
  margin-left: -1vh;
}

@media only screen and (min-width:45.063em) {
  aside li {
    padding: 0 0.625em;
    width: 50%;
    float: left;
  }
}
@media only screen and (min-width:64.063em) {
  p.more.vis {
    display: block;
    color: #fff;
    text-align: center;
    font-size: 2em;
  }

  .display {
    width: 26.25em;
  }

  body .ui-box {
    width: 51.25em;
    min-width: 51.25em;
    max-width: 60em;
    width: 80vw;
    margin: auto;
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    flex-wrap: wrap;
    height: auto;
    transform: translate(-50%, -50%);
  }
  body aside, body .dailer {
    float: right;
    height: auto;
    display: flex;
    flex-flow: column;
    flex-direction: column;
  }
  body aside {
    margin: 1em 0;
  }
  body aside li + li + li + li + li + li {
    display: none;
  }
  body .dailer {
    order: 1;
  }
  body aside {
    width: 25em;
    max-width: 29em;
    width: 39vw;
  }
  body aside li {
    float: none;
    width: 100%;
    padding: 0;
  }
  body .dailer {
    width: 26.25em;
    max-width: 31em;
    width: 41vw;
  }
}
@keyframes doubleBounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0);
  }
}
#tester {
  visibility: hidden;
  position: absolute;
  top: -1000px;
  white-space: nowrap;
}
</style>


  
</head>

<body>
  <div id="tester"></div> 
<div class="ui-box">
      <section class="dailer">
        <section class="calling">
          <section class="display">
            <p class="number">074 2</p>
          </section>
          <div class="avatar">
          </div>
          <p class="info">Calling</p>
          <section class="numblock">
            <ul>
              <li>
                <button>
                    <strong>
                      <i class="fa fa-user-plus"></i>
                      <span class="secondary">Add</span>
                    </strong>
                </button>
              </li>
              <li>
                <button>
                    <strong>
                      <i class="fa fa-microphone-slash"></i>
                      <span class="secondary">Mute</span>
                    </strong>
                </button>
              </li>
              <li>
                <button>
                    <strong>
                      <i class="fa fa-volume-up"></i>
                      <span class="secondary">Speaker</span>
                    </strong>
                </button>
              </li>
              <li>
                <button>
                    <strong>
                      <i class="fa fa-video-camera"></i>
                      <span class="secondary">Camera</span>
                    </strong>
                </button>
              </li>
              <li>
                <button>
                    <strong>
                      <i class="fa fa-comment"></i>
                      <span class="secondary">Chat</span>
                    </strong>
                </button>
              </li>
              <li>
                <button>
                    <strong>
                      <i class="fa fa-th"></i>
                      <span class="secondary">keypad</span>
                    </strong>
                </button>
              </li>
            </ul>
          </section>
          <button class="dail-cancel"><i class="fa fa-phone"></i></button>
        </section>
        <section class="display">
          <div class="add">+</div>
          <p class="number">074 2</p>
          <div class="delete">&times;</div>
        </section>
        <section class="numblock">
          <ul>
            <li>
              <button>
                  <strong>1</strong>
              </button>
            </li>
            <li>
              <button>
                  <strong>2</strong>
                  <span class="secondary">abc</span>
              </button>
            </li>
            <li>
              <button>
                  <strong>3</strong>
                  <span class="secondary">def</span>
              </button>
            </li>
            <li>
              <button>
                  <strong>4</strong>
                  <span class="secondary&q.........完整代码请登录后点击上方下载按钮下载查看

网友评论0