javascript - 移动设备上的溢出问题
问题描述
正如您从屏幕上看到的那样,我的页面部分有问题,我声明网站的所有其他有溢出的部分都工作得很好。我已经尝试过多次查看代码,但我不知道它可能是什么......也将不起作用的部分的代码放在下面
<div class="messageDiv w-full h-full flex flex-col justify-start overflow-scroll relative text-xl lg:text-xs">
<!--prototipo di messaggio-->
<% for(var i=messages.length-1 ; i >= 0 ; i--){ %>
<% if(messages[i].id_user == userId){ %>
<div class="flex justify-end items-center">
<div class="talk-bubble tri-right radius right-in bg-gray-900 text-white w-auto px-5 py-2 mb-2 lg:mb-1 mr-5">
<div class="talktext flex flex-col justify-center items-center">
<p class="text-left w-full"><%=messages[i].text%></p>
<div class="info-message flex justify-start items-center w-full pt-1 mt-1 overflow-hidden">
<p class="title text-rigth username"><%=messages[i].username%></p>
<i class="fas fa-circle text-white px-2"></i>
<i class="far fa-clock title"></i>
<p class="title ml-1"><%=messages[i].date.getHours()%>:<%=messages[i].date.getMinutes()%></p>
</div>
</div>
</div>
</div>
<% } else{ %>
<div class="flex justify-start items-center">
<div class="talk-bubble tri-left radius left-in bg-black text-white w-auto px-5 py-2 ml-5 mb-2 lg:mb-1">
<div class="talktext flex flex-col justify-center items-center">
<p class="text-left w-full"><%=messages[i].text%></p>
<div class="info-message flex justify-end items-center w-full pt-1 mt-1 overflow-hidden flex-no-wrap">
<p class="text-giallo text-rigth username"><%=messages[i].username%></p>
<i class="fas fa-circle text-white px-2"></i>
<i class="far fa-clock text-giallo"></i>
<p class="text-giallo ml-1"><%=messages[i].date.getHours()%>:<%=messages[i].date.getMinutes()%></p>
</div>
</div>
</div>
</div>
<% } %>
<% } %>
<!--end-->
</div>
解决方案
For mobile devices use:-
touch-action: auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up|pan-down ] || pinch-zoom ] | manipulation
这与溢出轴相同。
推荐阅读
- android-studio - 如何在颤振中使用 sha256 哈希密码?
- angular - Jimp loadFont 和 getBase64
- oracle - ORACLE - NLS_LANG、字符集、特殊字符
- python - 如何根据包含特定值的行(在任何列中)过滤数据框
- c# - SQL Server 在使用并行库时获取和更新相同的记录
- python - Pandas 通过 DatetimeIndex 填充另一个 DataFrame
- math - 找出有一条出路的城市数量
- c# - C# 搜索一个列表并将信息发送到另一个列表
- angular - 需要一个安全的 HTML,得到一个样式
- reactjs - 当我使用 useEffect 时试图准确了解发生了什么