Effect of touch button on mobile terminal , You can make it clear that something is going to happen to the user , It's a better experience , But there is no mouse pointer in the mobile device , use css Of hover It doesn't meet our needs , Fortunately, there is an activation abroad css Of active effect , The code is as follows :

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <meta
name="viewport"> <style> .btn{ display: block; position: relative; top: 100px;
margin: 20px; width: 200px; height: 50px; line-height: 50px; text-align:
center; border-radius: 5px; font-size: 18px; color: salmon; background-color:
skyblue; } .btn-on{ background-color: slateblue; } </style> </head> <body> <div
class="btn"></div> <script> var btn=document.querySelector(".btn");
btn.ontouchstart=function(){ this.className="btn btn-on"; }
btn.ontouchend=function(){ this.className="btn"; } </script> </body> </html>

©2019-2020 Toolsou All rights reserved,
QQ Login interface implementation code implementation mysql Addition, deletion, modification and query of database JAVA Experiment 4 set and functional programming experiment about String How to create objects VHDL——4 choose 1 Data selector C language ( Guess numbers games ) Blue Bridge Cup MCU advanced module --NE555 I don't memorize eight part essays , You go to the interview ? Hill sorting of sorting algorithm ——c++ realization python What does built-in function mean _python What are the built-in functions