Good evening, I have a question in CSS
I'm trying to do a conditional in css, similar to this below:
@media only screen and (max-width: 480px) {}
This conditional performs a certain action when the horizontal width of the page is below 480 pixels, however I am trying to make a conditional in css, which executes a certain action when the "Y" position of the scroll is somewhere, such as the end of the page, for example
Thank you to anyone who helps
In the code below I did this example of the text that if it decreases the width of the page it gets the background in red, which I am trying to do and leave the text in the background red when the text scroll is at the bottom of the page
<html>
<head>
</head>
<body>
<div id="teste">
<h1>SE DIMINUIR A LARGURA FICA VERMELHO, POREM QUERIA QUE FICASSE VERMELHO QUANDO O SCROLL FOSSE NO FIM DA PAGINA!</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *</BR> *FIM DA PAGINA, SE CONSEGUIU DEIXAR EM VERMELHO QUANDO O SCROLL CHEGA NO FIM OBRIGADO!!!</h1>
</div>
</body>
</html>
<style type="text/css">
@media only screen and (max-width: 480px) {
#teste{
background-color: red;
}
</style>