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
Table of contents When setting up a MySQL master-...
This article example shares the specific code of ...
Exposing network ports In fact, there are two par...
Table of contents Rendering API changes Render fu...
The fixed IP address of the centos-DVD1 version s...
Table of contents background Function Purpose Ide...
This article shares the specific code of js canva...
Table of contents 1. Overview of Docker consul 2....
1. Create a database authorization statement >...
This article uses an example to illustrate the us...
After the user logs out, if the back button on the...
This article example shares the specific code of ...
This article example shares the specific code of ...
Because the distribution package of MySQL Communi...
This tutorial explains how to verify the IP addre...