Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi,
I am trying to create a fade animation for an image in PowerBI that lasts 3 seconds and then disappears. I use the HTML Content custom visual.
Is my code OK? In my report, it doesn't work.
Thanks!
For the CSS:
CSS fade animation =
"
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.fade-out {
animation: fadeOut 3s forwards;
}
"
For the HTML:
Hi @AndreeaV
I believe you need to change the HTML measure to this, using fade-out as the class name:
HTML =
"<p>
<span class='fade-out'>" & [Flag] & "</span>
</p>"
This worked for me in a test report.
Does it work for you?