.fadeable {
transition: opacity 1s ease-in;
}
.transparent{
opacity: 0;
}
<h1 id="fader" class="fadeable">Hello Transition!</h1>
<script type="text/javascript">
window.onload = ()=>{
document.querySelector('#fader').className+=" transparent";
}
</script>