How to get a section to fade in and up nicely

I found this post from @dorilama which suggests that binding the opacity to a variable and then adding a transition should achieve the desired effect. I can get this to work once the element is displayed, but can’t get it to work when trying to first change the display property. Any suggestions please? Thanks!