This article introduces the sample code of CSS3 to achieve the effect of 3D text hover change, which is shared with you as follows: html <h1 class="hover-text-3d" data-text="w3cbest.com">W3CBEST.COM</h1> CSS .hover-text-3d { font-size: 7em; } .hover-text-3d { position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-text-fill-color: #fff; text-fill-color: #fff; } .hover-text-3d:before { position: absolute; overflow: hidden; width: 0; content: attr(data-text); -webkit-transition: 2s; -o-transition: 2s; transition: 2s; -webkit-text-fill-color: #aaf0d1; text-fill-color: #aaf0d1; -webkit-text-stroke-width: 2px; text-stroke-width: 2px; -webkit-text-stroke-color: #aaf0d1; text-stroke-color: #aaf0d1; -webkit-filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, .8)); -o-filter:drop-shadow(5px 5px 5px rgba(0, 0, 0, .8)); filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, .8)); } .hover-text-3d:hover:before { width: 100%; } View the effect The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
>>: Docker file storage path, modify port mapping operation mode
Some command differences between versions: show i...
1. COUNT(*) and COUNT(COL) COUNT(*) usually perfo...
In the previous chapters, we introduced how to ch...
1. Download the tomcat image docker pull tomcat:8...
Preface We all know that MySQL query uses the sel...
Table of contents 1. The significance of users an...
This article shares the specific code of JavaScri...
For many people who are new to HTML, table <ta...
The requirement is to pass in the rating data for...
For a website, it is the most basic function. So l...
Sorting Problem I recently read "45 Lectures...
Table of contents Slots What are slots? Slot Cont...
Achieve results Implementation Code html <div ...
Pitfalls encountered during project deployment Wh...
It has been a long time since the last update of ...