Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tailwind bg opacity

I was curious about the CSS behind tailwinds bg opacity. I could only find 'opacity' in pure CSS but that affects everything rather than just the background. Could somebody please explain this?

like image 482
r1a2k3i4b Avatar asked Mar 21 '26 05:03

r1a2k3i4b


1 Answers

See Here in the tailwind docs. The second number indicates the opacity.

<button class="bg-sky-500/100 ..."></button>
<button class="bg-sky-500/75 ..."></button>
<button class="bg-sky-500/50 ..."></button>
like image 119
Joeboulton Avatar answered Mar 22 '26 17:03

Joeboulton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!