柒比贰美化专题-右侧悬浮菜单(客服)教程

释放双眼,带上耳机,听听看~!

01.footer.php代码:

分为两部分,一部分是CSS,CSS部分建议加到子主题的Style.Css里面!

另一部分是加到Seven文件夹下Footer.php里面,至于里面的位置放到</body>前面

PS (代码中的图片请自行替换)

下面是Footer.php的代码

<div class="elevator_item mobile-hide" id="elevator_item">
  <a class="hd-time-limited mobile-hide" target=“_blank” href="https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=8g7phepa" rel="nofollow"></a>
  <div aria-label="领取代金券" data-microtip-position="left" role="tooltip">
    <a target="_blank" class="feedback graHover mobile-hide" style="background-color: #53d397;color:#fff;" target=“_blank” href="https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=8g7phepa" rel="nofollow">
      <i class="blog icon-liwu1"></i>
    </a>
  </div>
  <div aria-label="企业两折上云" data-microtip-position="left" role="tooltip">
    <a target="_blank" class="feedback graHover mobile-hide" style="background-color: #1e6be3;color:#fff;" target=“_blank” href="https://promotion.aliyun.com/ntms/act/enterprise-discount.html?userCode=8g7phepa" rel="nofollow">
      <i class="blog icon-qiyezhuangtai"></i>
    </a>
  </div>
  <div aria-label="全民云优惠" data-microtip-position="left" role="tooltip">
    <a target="_blank" class="feedback graHover mobile-hide" style="background-color: #404b69;color:#fff;" target=“_blank” href="https://promotion.aliyun.com/ntms/act/qwbk.html?userCode=8g7phepa" rel="nofollow">
      <i class="blog icon-guanyuwomen6"></i>
    </a>
  </div>
  <div class="feedback medium mobile-hide">
    <i class="blog icon-ai-weixin"></i>
    <div class="lf-box mobile-hide">
      <ul class="sp-list mobile-hide">
        <li>
          <span>官方客服:841566509</span>
          <a href="tencent://AddContact/?fromId=50&amp;fromSubId=1&amp;subcmd=all&amp;uin=841566509" target="_self" class="btn-addGroup graHover" rel="nofollow"><div style="font-size:12px">一键联系</div></a></li>
        <li class="spl-li clearfix mobile-hide">
          <div class="fl mobile-hide">
            <span>技术交流群</span>
            <img alt="" src="https://adorableuncle.oss-cn-hangzhou.aliyuncs.com/wp-content/uploads/2019/03/qq.png" onerror="this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);"></div>
          <div class="fr mobile-hide">
            <span>站长微信</span>
            <img alt="" src="https://adorableuncle.oss-cn-hangzhou.aliyuncs.com/wp-content/uploads/2019/03/vx.png" onerror="this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);"></div>
        </li>
      </ul>
    </div>
  </div>
</div>

02.css代码:

/**右侧边栏*/
.elevator_item .hd-time-limited {
    display: block;
    position: fixed;
    right: -10px;
    bottom: 450px;
    width: 80px;
    height: 140px;
    background: url(https://adorableuncle.oss-cn-hangzhou.aliyuncs.com/wp-content/uploads/2019/03/time-limited.png) no-repeat center;
    animation: vip-199-180510 2.4s infinite;
    margin-top: 10px
}

@keyframes vip-199-180510 {
    0 {
        bottom: 442px
    }

    50% {
        bottom: 450px
    }

    100% {
        bottom: 442px
    }
}

.aj-popbox .hd-time-limited .close-btn {
    width: 38px;
    height: 38px;
    right: 28px;
    top: 30px;
    line-height: 38px;
    text-align: center
}

.aj-popbox .hd-time-limited .close-btn i {
    font-size: 24px;
    color: #fff
}

.aj-popbox .hd-time-limited .timer {
    margin: 296px auto 0;
    width: 234px;
    font-size: 30px;
    color: #000;
    line-height: 48px;
    padding-left: 10px;
    letter-spacing: 13px;
    font-weight: bold
}

.aj-popbox .hd-time-limited .go-hd:hover {
    transform: scale(.95) translateY(2px)
}

.elevator_item {
    position: fixed;
    right: 12px;
    bottom: 240px;
    z-index: 11
}

.elevator_item .feedback {
    width: 36px;
    height: 40px;
    background-color: #fff;
    color: #fa3c64;
    font-size: 20px;
    padding: 5px 6px;
    display: block;
    border-radius: 5px;
    text-align: center;
    margin-top: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.35);
    cursor: pointer
}

.elevator_item .advice,.elevator_item .add,.elevator_item .return {
    color: #383838;
    line-height: 30px
}

.elevator_item .advice i {
    font-size: 28px
}

.elevator_item .add i,.elevator_item .return i {
    font-size: 20px
}

.elevator_item .advice:hover .icon-jianyi:before {
    content: '意见反馈';
    color: #fa3c64;
    font-size: 12px;
    line-height: 15px;
    display: block
}

.elevator_item .medium {
    position: relative;
    background-color: #fa3c64;
    color: #fff
}

.elevator_item .medium .lf-box {
    display: none;
    position: absolute;
    right: 41px;
    top: -90px;
    width: 370px;
    height: 280px;
    padding-right: 10px
}

.elevator_item .medium .sp-list {
    width: 360px;
    height: 280px;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.35)
}

.elevator_item .medium .sp-list li:first-child {
    height: 70px;
    border-bottom: 1px solid #e5e5e5;
    padding: 20px 50px
}

.elevator_item .medium li:first-child span {
    font-size: 14px;
    color: #383838;
    float: left;
    line-height: 30px
}

.elevator_item .medium .btn-addGroup {
    width: 90px;
    height: 30px;
    border-radius: 5px;
    background: #fa3c64;
    color: #fff;
    line-height: 30px;
    text-align: center;
    float: left;
    margin-left: 14px
}

.elevator_item .medium .spl-li {
    padding: 22px 34px 0
}

.elevator_item .medium .spl-li span {
    display: block;
    font-size: 14px;
    color: #383838;
    margin-bottom: 8px
}

.elevator_item .medium .spl-li img {
    width: 130px
}

.elevator_item .add {
    position: relative
}

.elevator_item .add .lf-box {
    display: none;
    position: absolute;
    right: 31px;
    top: -32px;
    width: 178px;
    height: 104px;
    padding-right: 10px
}

.elevator_item .add .sp-list {
    width: 168px;
    height: 104px;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(100,25,25,0.35)
}

.elevator_item .add .sp-list li {
    line-height: 52px;
    font-size: 14px;
    color: #383838;
    text-align: left
}

.elevator_item .add .sp-list li a {
    display: block;
    height: 52px;
    width: 100%
}

.elevator_item .add .sp-list li:hover a {
    color: #fa3c64
}

.elevator_item .add .sp-list li:hover i {
    color: #fa3c64
}

.elevator_item .add .sp-list li:first-child {
    border-bottom: 1px solid #e5e5e5
}

.elevator_item .add .sp-list i {
    color: #d8d8d8;
    font-size: 28px;
    margin-left: 16px;
    margin-right: 14px;
    vertical-align: middle
}

.elevator_item .add:hover>i,.elevator_item .return:hover>i {
    color: #fa3c64
}

.elevator_item .feedback:hover .lf-box {
    display: block
}

.fl {
    float: left
}

.fr {
    float: right
}

.graHover {
    position: relative;
    overflow: hidden
}

.graHover:before {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    content: '';
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,.2)
}

.graHover:hover:before {
    display: block
}

.clearfix {
    *zoom: 1
}

.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0
}

* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box
}
/* ------------------------------------------------
  [1] Base Styles
-------------------------------------------------*/

[aria-label][role~="tooltip"] {
  position: relative;
}

[aria-label][role~="tooltip"]::before,
[aria-label][role~="tooltip"]::after {
  transform: translate3d(0, 0, 0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
  opacity: 0;
  pointer-events: none;
  transition: all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s);
  position: absolute;
  box-sizing: border-box;
  z-index: 10;
  transform-origin: top;
}

[aria-label][role~="tooltip"]::before {
  background-size: 100% auto !important;
  content: "";
}

[aria-label][role~="tooltip"]::after {
  background: rgba(17, 17, 17, .9);
  border-radius: 4px;
  color: #ffffff;
  content: attr(aria-label);
  font-size: var(--microtip-font-size, 13px);
  font-weight: var(--microtip-font-weight, normal);
  text-transform: var(--microtip-text-transform, none);
  padding: .5em 1em;
  white-space: nowrap;
  box-sizing: content-box;
}

[aria-label][role~="tooltip"]:hover::before,
[aria-label][role~="tooltip"]:hover::after,
[aria-label][role~="tooltip"]:focus::before,
[aria-label][role~="tooltip"]:focus::after {
  opacity: 1;
  pointer-events: auto;
}
/* ------------------------------------------------
  [2] Position Modifiers
-------------------------------------------------*/

[role~="tooltip"][data-microtip-position|="top"]::before {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%280%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
  height: 6px;
  width: 18px;
  margin-bottom: 5px;
}

[role~="tooltip"][data-microtip-position|="top"]::after {
  margin-bottom: 11px;
}

[role~="tooltip"][data-microtip-position|="top"]::before {
  transform: translate3d(-50%, 0, 0);
  bottom: 100%;
  left: 50%;
}

[role~="tooltip"][data-microtip-position|="top"]:hover::before {
  transform: translate3d(-50%, -5px, 0);
}

[role~="tooltip"][data-microtip-position|="top"]::after {
  transform: translate3d(-50%, 0, 0);
  bottom: 100%;
  left: 50%;
}

[role~="tooltip"][data-microtip-position="top"]:hover::after {
  transform: translate3d(-50%, -5px, 0);
}

/* ------------------------------------------------
  [2.1] Top Left
-------------------------------------------------*/
[role~="tooltip"][data-microtip-position="top-left"]::after {
  transform: translate3d(calc(-100% + 16px), 0, 0);
  bottom: 100%;
}

[role~="tooltip"][data-microtip-position="top-left"]:hover::after {
  transform: translate3d(calc(-100% + 16px), -5px, 0);
}


/* ------------------------------------------------
  [2.2] Top Right
-------------------------------------------------*/
[role~="tooltip"][data-microtip-position="top-right"]::after {
  transform: translate3d(calc(0% + -16px), 0, 0);
  bottom: 100%;
}

[role~="tooltip"][data-microtip-position="top-right"]:hover::after {
  transform: translate3d(calc(0% + -16px), -5px, 0);
}


/* ------------------------------------------------
  [2.3] Bottom
-------------------------------------------------*/
[role~="tooltip"][data-microtip-position|="bottom"]::before {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236px%22%20height%3D%2212px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28180%2018%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
  height: 6px;
  width: 18px;
  margin-top: 5px;
  margin-bottom: 0;
}

[role~="tooltip"][data-microtip-position|="bottom"]::after {
  margin-top: 11px;
}

[role~="tooltip"][data-microtip-position|="bottom"]::before {
  transform: translate3d(-50%, -10px, 0);
  bottom: auto;
  left: 50%;
  top: 100%;
}

[role~="tooltip"][data-microtip-position|="bottom"]:hover::before {
  transform: translate3d(-50%, 0, 0);
}

[role~="tooltip"][data-microtip-position|="bottom"]::after {
  transform: translate3d(-50%, -10px, 0);
  top: 100%;
  left: 50%;
}

[role~="tooltip"][data-microtip-position="bottom"]:hover::after {
  transform: translate3d(-50%, 0, 0);
}


/* ------------------------------------------------
  [2.4] Bottom Left
-------------------------------------------------*/
[role~="tooltip"][data-microtip-position="bottom-left"]::after {
  transform: translate3d(calc(-100% + 16px), -10px, 0);
  top: 100%;
}

[role~="tooltip"][data-microtip-position="bottom-left"]:hover::after {
  transform: translate3d(calc(-100% + 16px), 0, 0);
}


/* ------------------------------------------------
  [2.5] Bottom Right
-------------------------------------------------*/
[role~="tooltip"][data-microtip-position="bottom-right"]::after {
  transform: translate3d(calc(0% + -16px), -10px, 0);
  top: 100%;
}

[role~="tooltip"][data-microtip-position="bottom-right"]:hover::after {
  transform: translate3d(calc(0% + -16px), 0, 0);
}


/* ------------------------------------------------
  [2.6] Left
-------------------------------------------------*/
[role~="tooltip"][data-microtip-position="left"]::before,
[role~="tooltip"][data-microtip-position="left"]::after {
  bottom: auto;
  left: auto;
  right: 100%;
  top: 50%;
  transform: translate3d(10px, -50%, 0);
}

[role~="tooltip"][data-microtip-position="left"]::before {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%28-90%2018%2018%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
  height: 18px;
  width: 6px;
  margin-right: 5px;
  margin-bottom: 0;
}

[role~="tooltip"][data-microtip-position="left"]::after {
  margin-right: 11px;
}

[role~="tooltip"][data-microtip-position="left"]:hover::before,
[role~="tooltip"][data-microtip-position="left"]:hover::after {
  transform: translate3d(0, -50%, 0);
}


/* ------------------------------------------------
  [2.7] Right
-------------------------------------------------*/
[role~="tooltip"][data-microtip-position="right"]::before,
[role~="tooltip"][data-microtip-position="right"]::after {
  bottom: auto;
  left: 100%;
  top: 50%;
  transform: translate3d(-10px, -50%, 0);
}

[role~="tooltip"][data-microtip-position="right"]::before {
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2212px%22%20height%3D%2236px%22%3E%3Cpath%20fill%3D%22rgba%2817,%2017,%2017,%200.9%29%22%20transform%3D%22rotate%2890%206%206%29%22%20d%3D%22M2.658,0.000%20C-13.615,0.000%2050.938,0.000%2034.662,0.000%20C28.662,0.000%2023.035,12.002%2018.660,12.002%20C14.285,12.002%208.594,0.000%202.658,0.000%20Z%22/%3E%3C/svg%3E") no-repeat;
  height: 18px;
  width: 6px;
  margin-bottom: 0;
  margin-left: 5px;
}

[role~="tooltip"][data-microtip-position="right"]::after {
  margin-left: 11px;
}

[role~="tooltip"][data-microtip-position="right"]:hover::before,
[role~="tooltip"][data-microtip-position="right"]:hover::after {
  transform: translate3d(0, -50%, 0);
}

/* ------------------------------------------------
  [3] Size
-------------------------------------------------*/
[role~="tooltip"][data-microtip-size="small"]::after {
  white-space: initial;
  width: 80px;
}

[role~="tooltip"][data-microtip-size="medium"]::after {
  white-space: initial;
  width: 150px;
}

[role~="tooltip"][data-microtip-size="large"]::after {
  white-space: initial;
  width: 260px;
}
.open-message {
  margin-bottom: 10px;
  padding: 5px 10px;
  text-align: center
/* border:1px solid #faebcc; *//* border-radius:2px; *//* background-color:#fcf8e3; *//* color:#8a6d3b */
}
.open-message i {
  text-indent: -20px
}
.open-message {
  border: #4094ef 1px solid;
  border-radius: 5px 5px 5px 5px;
}.open-message {
  border: #4094ef 1px solid;
  border-radius: 5px 5px 5px 5px;
}
.open-message a {
  color: red
}
.open-message:hover {
  background-color: #4094ef;
  color: #fff;
  transition-duration: .3s
}

 

人已赞赏
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧