我正在制作一個(gè)網(wǎng)站,您可以在兩個(gè)不同的列中發(fā)送消息(對(duì)于兩個(gè)假定的用戶)。有一個(gè)腳步聲系統(tǒng)每秒都會(huì)增加<br>一次,因此消息一出現(xiàn)就會(huì)立即上升。所以基本上,每次您發(fā)送一條消息時(shí),它都會(huì)在您發(fā)送的列中上升,直到它在頁面頂部消失。我的問題如下:每次用戶輸入一條消息時(shí),它都會(huì)使該列的所有其他消息發(fā)生變化(我認(rèn)為這是正常的),但其他人的列不受此更改的影響,因此如果它是一個(gè)重要的信息。我想知道這是否可以彌補(bǔ)這一點(diǎn);因?yàn)槲乙呀?jīng)嘗試了很多事情,但我什么也沒想到,而且由于我仍在學(xué)習(xí),所以我看不到太遠(yuǎn)哈哈......https://i.stack.imgur.com/tBouv.gif body { font-family: sans-serif; font-size: 1.3rem; margin: 0; background-color: #5a6c58;}.messInd { margin: 0; padding: 0;}#messL, #messR{ width: 24vw; position: fixed; bottom: 0; background-color: pink;}.wrapper { display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 0px; grid-auto-rows: minmax(100vh, auto); height: 100vh;}.pathL,.pathR{ -ms-overflow-style: none; /* Internet Explorer 10+ */ scrollbar-width: none; /* Firefox */ overflow: scroll; position: relative; height: 100%; background-color: #ffdbf5;}.pathL { background: rgb(255,219,245); overflow: hidden; text-align: center; padding: 0.5rem; grid-column: 1 / 2;}.pathR { background: rgb(255,255,245); grid-column: 2 / 2;} .pathL::-webkit-scrollbar, .pathR::-webkit-scrollbar{ display: none; /* Safari and Chrome */}<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><div class ="wrapper"> <div class="pathL" id="droite"> <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> <div id="messL"> <input id="mL" autocomplete="off" name="name"/> </div> </div>
避免文本在列中向上移動(dòng)
FFIVE
2023-08-24 17:32:22