CSS to achieve floating customer service effect

CSS to achieve floating customer service effect

insert image description here

<div class="sideBar">
    <div>
        <div class="tips">Online Customer Service</div>
        <ul class="list">
            <li>QQ:1846492969</li>
            <li>QQ:1846492969</li>
            <li>QQ:1846492969</li>
            <li>QQ:1846492969</li>
            <li>QQ:1846492969</li>
        </ul>
    </div>
</div>
.sideBar {
 position:fixed;
 right:-182px;
 top:50px;
 background-color:#ffffff;
 border:#eea236 solid 1px;
 transition:right 0.5s;
 border:solid 1px red;
}
.sideBar:hover {
 right:0;
}
.sideBar>div {
 position:relative;
}
.sideBar .tips {
 position:absolute;
 height:120px;
 line-height:25px;
 background-color:#eea236;
 width:40px;
 left:-40px;
 top:50px;
 text-align:center;
 box-sizing:border-box;
 padding:10px 10px;
 border-top-left-radius:5px;
 border-bottom-left-radius:5px;
 font-weight:bold;
 color:#ffffff;
}
.sideBar .list {
 padding:0;
 list-style:none;
 width:180px;
 margin:0;
}
.sideBar .list>li {
 padding:15px;
 border-top:#eea236 dashed 1px;
}
.sideBar .list>li:hover {
 background-color:#f0ad4e;
 color:#ffffff;
}
.sideBar .list>li:first-child {
 border-top:none;
}

Summarize

The above is the CSS method for achieving the floating customer service effect introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

<<:  Have you carefully understood Tags How it is defined How to use

>>:  How to use Font Awesome 5 in Vue development projects

Recommend

Sample code for realizing book page turning effect using css3

Key Takeaways: 1. Mastering CSS3 3D animation 2. ...

npm Taobao mirror modification explanation

1. Top-level usage 1. Install cnpm npm i -g cnpm ...

Basic notes on html and css (must read for front-end)

When I first came into contact with HTML, I alway...

Detailed explanation of MySQL partition table

Preface: Partitioning is a table design pattern. ...

The three new indexes added in MySQL 8 are hidden, descending, and functions

Table of contents Hidden, descending, and functio...

Introduction to HTML for front-end developers

1 Introduction to HTML 1.1 First experience with ...

How to regularly clean up docker private server images

Using CI to build docker images for release has g...

js to realize a simple disc clock

This article shares the specific code of js to im...

Summary of fragmented knowledge of Docker management

Table of contents 1. Overview 2. Application Exam...

Detailed analysis of MySQL master-slave delay phenomenon and principle

1. Phenomenon In the early morning, an index was ...

Five ways to traverse JavaScript arrays

Table of contents 1. for loop: basic and simple 2...

Tutorial on migrating mysql from phpstudy to Linux

Project Purpose Migrate the data in MySQL 5.5.53 ...