【发布时间】:2022-12-01 20:26:23
【问题描述】:
I am trying to use CSS filters to create a "disabled" look for components I am working on. I am trying to make it so that everything is "washed out" a bit. I can create this effect by using opacity(0.75) for components which are on white background: then black becomes gray and all strong colors become a bit more white. But the issue is if the component is not on white background, then opacity does not work as I would like. So how could I use CSS filters to create this "wash out" look? Like to multiply with white color a bit all colors.
I tried contrast but it looks like everything goes to gray, not white (so black stays black much longer than with opacity, while other colors are already washed out).
【问题讨论】:
-
add a transparent white overlay on its top?
-
A JS approach here, just as a FYI in case it can help: stackoverflow.com/q/47022484/1225328
标签: css