
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
With CSS add transparency to a button
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>
- Related Questions & Answers
- Add transparency to the background with CSS
- How to add rounded corners to a button with CSS?
- How to add a button to an image with CSS?
- How to add a colored border to a button with CSS?
- Add a pressed effect on button click with CSS
- CSS Opacity / Transparency
- CSS Transparency Using RGBA
- Create a Button Group with CSS
- How to create a search button with CSS?
- Create a Vertical Button Group with CSS
- Create a Bordered Button Group with CSS
- How to create a split button dropdown with CSS?
- Create a link button with borders using CSS
- Change the padding of a button with CSS
- Set the width of a button with CSS
Advertisements