To add transparency to a button, use the CSS opacity property. This creates a disabled look for the button.
You can try to run the following code to add transparency to a button
Example
<!DOCTYPE html> <html> <head> <style> .btn1 { color: black; text-align: center; font-size: 15px; } .btn2 { color: black; text-align: center; font-size: 15px; opacity: 0.8; } </style> </head> <body> <h2>Result</h2> <p>Click below for result:</p> <button class = "btn1">Enabled</button> <button class = "btn2">Disabled</button> </body> </html>