Custom code loads and then disappears

I am testing custom code using the free plan, to see if I can achieve a box with scrolling text (this is an important feature I want to know I can use, if I am to sign up for a paid plan).
I am aware that I can’t publish custom code with a free plan, but am led to believe that I can at least preview it?
However, when I try apply the custom code it loads the text box briefly in the extreme top left of the window as the preview is loading, and then it disappears. Even a custom code for a simple text box without scrolling ability does this.
I’ve tried HTML loaded into After with CSS in CSS. I’ve even tried just HTML loaded into After . No luck. What am I doing wrong? Does anyone have advice on this for me please?

could you share some code you are trying to implement?