<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! |
<<: Have you carefully understood Tags How it is defined How to use
>>: How to use Font Awesome 5 in Vue development projects
Absolute positioning method: (1) Set the parent e...
Experimental environment: MYSQL 5.7.22 Enable bin...
Table of contents Exporting Docker containers Imp...
Custom tags can be used freely in XML files and HT...
MySQL is a multi-user managed database that can a...
This article shares the specific code of Vue to a...
Table of contents 1. Introduction to autofs servi...
This article example shares the specific code of ...
Table of contents 1. Overview 1. Principle 2. Imp...
1. Open the virtual machine and git bash window a...
Let's start with the body: When viewing a web ...
Introduction to vi/vim They are both multi-mode e...
This article introduces 5 ways to solve the 1px b...
There are two types: (different browsers) 1. Avail...
introduction Our company is engaged in the resear...