I am using this open source code for a web page animation (below), which works successfully.
It uses the <h5 and ‘section class’ code. I’d like to show the text in a smaller size in a mobile view, but when I remove the <h5 & /h5> tags to then modify the font size it displaces the section of text to the top of the page. So, I’d like to keep the section of code in place, but be able to modify the font size for mobile view.
.animation-box12 {
display:flex;
min-height: 3.5rem;
margin: 100px 0 0 100px;
justify-content: center;
align-items: center;
width: 100%;
}
.animation-box12 span {
margin: 0 .15em;
width: 100%;
animation-name: fadeInOut-1;
}
<h5>
<section class="animation-box12">
<span class="text1" style="color:#000000">HELLO</span><span class="text1" style="color:#666666"> TEST</span><br>
<span class="text1" style="color:#ffffff">This Sentence</span><br>
<span class="text2" style="color:#eeeeee">This Other Sentence</span>
</section>
</h5>
Any guidance is appreciated.