#image {
background: url('/image.jpg/') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
-webkit-animation: myfirst 5s ; /* Chrome, Safari, Opera */
animation: myfirst 5s ;
}
OutputTextNoBr("<img src=\"" + GetFileURL("image.jpg") + "\" class=\"fadeinimg\">")
OutputTextNoBr("<img src=\"" + GetFileURL("image.jpg") + "\" onload=\"$(this).fadeIn(5000);\">")
<css>
<![CDATA[
<style>
#titleimage {
display: none;
}
</style>
]]>
</css>
<start type="script">
<![CDATA[
OutputTextNoBr (game.css)
OutputTextNoBr("<img src=\"" + GetFileURL("image.jpg") + "\" id=\"titleimage\" onload=\"$(this).fadeIn(5000);\">")
]]>
</start>
jaynabonne wrote:Ok, I got it to work. I was missing that you have to set "display:none" on the image, which didn't make sense to me earlier as it uses opacity to fade in the image - and the first thing it does it set display to "inline". It must be checking if display is already not "none".
At any rate, the CSS is:<css>
<![CDATA[
<style>
#titleimage {
display: none;
}
</style>
]]>
</css>
and the code (wherever you like it - I had it in my start script, which I'm showing since you do need the CDATA stuff if you're adding it via code view) is<start type="script">
<![CDATA[
OutputTextNoBr (game.css)
OutputTextNoBr("<img src=\"" + GetFileURL("image.jpg") + "\" id=\"titleimage\" onload=\"$(this).fadeIn(5000);\">")
]]>
</start>