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

How to make CSS child elements highly consistent with parent elements

Absolute positioning method: (1) Set the parent e...

Example of exporting and importing Docker containers

Table of contents Exporting Docker containers Imp...

How to use custom tags in html

Custom tags can be used freely in XML files and HT...

Detailed explanation of mysql.user user table in Mysql

MySQL is a multi-user managed database that can a...

Vue realizes simple effect of running light

This article shares the specific code of Vue to a...

Linux Autofs automatic mount service installation and deployment tutorial

Table of contents 1. Introduction to autofs servi...

js drag and drop table to realize content calculation

This article example shares the specific code of ...

Sample code for implementing mysql master-slave replication in docker

Table of contents 1. Overview 1. Principle 2. Imp...

Records of using ssh commands on Windows 8

1. Open the virtual machine and git bash window a...

HTML Basics: HTML Content Details

Let's start with the body: When viewing a web ...

Several ways to solve the 1px border problem on mobile devices (5 methods)

This article introduces 5 ways to solve the 1px b...

SSM implements the mysql database account password ciphertext login function

introduction Our company is engaged in the resear...