Effect picture: html: <div class='site_bar'>Home</div> css: .site_bar{ background-image : linear-gradient(red,red); background-position : center bottom; background-size : 0 2px; background-repeat : no-repeat; //This attribute cannot be missing. transition : .3s; } .site_bar:hover{ background-size : 100% 2px; } Summarize The above is the pure CSS implementation of horizontal line animation (background-image) under the element 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! |
<<: Some questions about hyperlinks
>>: JavaScript imitates Jingdong magnifying glass effect
Table of contents 1. Environmental Preparation 2....
On CentOS 7, when we map the host port to the con...
Study plans are easily interrupted and difficult ...
The vue project implements an upgraded version of...
Preface As one of the best web servers in the wor...
Initialize Dockerfile Assuming our project is nam...
Some fault code tables use the following design p...
background Solving browser compatibility issues i...
Here are some common MySQL commands for you: -- S...
To search for RocketMQ images, you can search on ...
1. Parent components can pass data to child compo...
If you're collecting information from your us...
http return code list (below is an overview) for ...
Detailed installation tutorial of mysql-5.7.23-wi...
MySQL installation is divided into installation v...