18168733823 在线客服 意见反馈 返回顶部
行业动态 技术分享

手机站设计之底部设计实例

2019-12-24 分享

效果图


页面

<nav>
  <ul>
    <li>
      <a href="#">
        <div class="svg-container">
          <svg>
            <use xlink:href="#events">
          </svg>
        </div>
        <div class="text-container">
          <span>Events</span>
        </div>
      </a>
    </li>
    <li>
      <a href="#">
        <div class="svg-container">
          <svg>
            <use xlink:href="#search">
          </svg>
        </div>
        <div class="text-container">
          <span>Search</span>
        </div>
      </a>
    </li>
    <li>
      <a href="#">
        <div class="svg-container">
          <svg>
            <use xlink:href="#trending">
          </svg>
        </div>
        <div class="text-container">
          <span>Trending</span>
        </div>
      </a>
    </li>
    <li>
      <a href="#">
        <div class="svg-container">
          <svg>
            <use xlink:href="#settings">
          </svg>
        </div>
        <div class="text-container">
          <span>Settings</span>
        </div>
      </a>
    </li>
  </ul>
</nav>

<svg style="display:none">
  <symbol viewBox="0 0 42 42" id="events">
    <path fill="#A2A2C3" d="M4,41h34c2.209,0,4-1.791,4-4V7.75c0-2.209-1.791-4-4-4H4c-2.209,0-4,1.791-4,4V37C0,39.209,1.791,41,4,41z"/>
    <path fill="#FCFCFC" d="M21.793,11.227l2.352,7.177c0.112,0.341,0.432,0.571,0.793,0.571h7.612c0.808,0,1.144,1.025,0.49,1.496
                            l-6.158,4.436c-0.292,0.211-0.415,0.584-0.303,0.924l2.352,7.177c0.25,0.762-0.63,1.395-1.283,0.924l-6.158-4.436
                            c-0.292-0.211-0.688-0.211-0.98,0l-6.158,4.436c-0.654,0.471-1.533-0.163-1.283-0.924l2.352-7.177
                            c0.112-0.341-0.011-0.714-0.303-0.924L8.96,20.471C8.306,20,8.642,18.975,9.45,18.975h7.612c0.361,0,0.682-0.231,0.793-0.571
                            l2.352-7.177C20.456,10.465,21.544,10.465,21.793,11.227z"/>
    <path fill="#A2A2C3" d="M37,5h1c0.552,0,1-0.448,1-1V1c0-0.552-0.448-1-1-1h-1c-0.552,0-1,0.448-1,1v3C36,4.552,36.448,5,37,5z"/>
    <path fill="#A2A2C3" d="M4,5h1c0.552,0,1-0.448,1-1V1c0-0.552-0.448-1-1-1H4C3.448,0,3,0.448,3,1v3C3,4.552,3.448,5,4,5z"/>
  </symbol>
  <symbol viewBox="0 0 42 42" id="search" >
    <path fill="none" stroke="#A2A2C3" stroke-width="3" stroke-miterlimit="10" d="M3.772,16.658c0,7.663,6.212,13.875,13.875,13.875
                                                                                  c3.136,0,6.028-1.04,8.352-2.794c3.355-2.533,5.523-6.553,5.523-11.081c0-7.663-6.212-13.875-13.875-13.875
                                                                                  S3.772,8.995,3.772,16.658z"/>
    <line fill="none" stroke="#A2A2C3" stroke-width="3" stroke-linecap="round" stroke-miterlimit="10" x1="38.228" y1="39.217" x2="26.814" y2="27.449"/>
  </symbol>
  <symbol viewBox="0 0 42 42" id="trending">
    <polygon fill="#A2A2C3" points="23.614,0.5 12.942,22.56 23.427,22.56 23.614,0.5 12.942,22.56 	"/>
    <polygon fill="#A2A2C3" points="18.386,41.5 29.058,19.44 18.573,19.44 18.386,41.5 29.058,19.44 	"/>
  </symbol>
  <symbol viewBox="0 0 42 42" id="settings">
    <circle fill="#A2A2C3" cx="29.512" cy="13.295" r="3"/>
    <line fill="none" stroke="#A2A2C3" stroke-width="3" stroke-linecap="round" stroke-miterlimit="10" x1="4.189" y1="13.295" x2="23.353" y2="13.295"/>
    <line fill="none" stroke="#A2A2C3" stroke-width="3" stroke-linecap="round" stroke-miterlimit="10" x1="35.671" y1="13.295" x2="37.811" y2="13.295"/>
    <circle fill="#A2A2C3" cx="14.858" cy="28.705" r="3"/>
    <line fill="none" stroke="#A2A2C3" stroke-width="3" stroke-linecap="round" stroke-miterlimit="10" x1="37.811" y1="28.705" x2="20.76" y2="28.705"/>
    <line fill="none" stroke="#A2A2C3" stroke-width="3" stroke-linecap="round" stroke-miterlimit="10" x1="8.956" y1="28.705" x2="4.189" y2="28.705"/>
  </symbol>
</svg>

CSS

html,
body {
  height: 100%;
}
body {
  background: #253598;
  color: #211d69;
  font-family: sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
ul,
li {
  list-style-type: none;
  padding: 0;
  display: inline-block;
  margin-bottom: 0;
}
svg {
  width: 31px;
  height: 31px;
  margin: 0px 5px;
  transition: 0.45s ease-in-out all;
}
a {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  cursor: pointer;
  min-width: 100px;
  position: relative;
  text-decoration:none;
  color:#211d69;
}
a:before {
  position: absolute;
  content: "";
  top: 60%;
  left: 46%;
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #211d69;
  transform: scale(0);
  transform-origin: 50% 50%;
  transition: 0.45s ease-in-out all;
}
nav {
  padding: 20px 20px 0px 20px;
  background: #fff;
  border-radius: 0% 0% 30px 30px;
  box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.15);
}
span {
  transition: 0.45s ease-in-out all;
  position: absolute;
  top: 11px;
}
.text-container,
.svg-container {
  display: flex;
  justify-content: center;
  -webkit-mask-image: url("https://kasperdebruyne.be/img/mask2.svg");
  -webkit-mask-composite: source-out;
  -webkit-mask-position: 0px -14px;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100px 40px;
  position: relative;
  width: 100%;
  height: 40px;
  transition: 0.45s ease-in-out all;
}
.text-container {
  transition-delay: 0.1s;
}
.svg-container {
  -webkit-mask-size: 100px 60px;
  -webkit-mask-position: 0px 0px;
  transform:translateZ(0); /* Firefox  */
}
a:hover .svg-container {
  transform: translateY(-24px);
  -webkit-mask-position: 0px -40px;
}
a:hover:before {
  transform: scale(1);
  transition-delay: 0.15s;
}
a:hover span {
  transform: translateY(-10px);
}
a:hover .text-container {
  transform: translateY(-34px);
  -webkit-mask-position: 0px 0px;
}
在线咨询
Copyright © 2019 江苏如斯镁科技有限公司 版权所有 苏ICP备19052370号-3   友情链接: 在线商城 网站地图