Replies: 3 comments 17 replies
-
Hello, I often find myself in the same scenario so I found a workaround to get the effect you want. Basically, since the <div class="relative w-full">
<div class="absolute inset-0 bg-gradient from-color to-color opacity-25"></div>
<div class="relative">
<!-- children -->
</div>
</div> |
Beta Was this translation helpful? Give feedback.
1 reply
-
The following discussions might be related to yours: |
Beta Was this translation helpful? Give feedback.
0 replies
-
Using Tailwind v3.0 <div className="w-full bg-gradient-to-r from-purple-400/25 via-pink-500/25 to-red-500/25 rounded p-6 mt-4">
// children...
</div> |
Beta Was this translation helpful? Give feedback.
16 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It seems that I am unable to apply any
bg-opacity-{value}
classes to an element that has any form of background gradient. Currently I am trying to do this here:If you were to run this code, you would just see a block with a full opacity gradient in the background, without the
bg-opacity-25
applying. Are there any work arounds or solutions for this?Beta Was this translation helpful? Give feedback.
All reactions