http://eusville.com/eusVote/1/baltimore-sushi
点击“添加评论/费率”按钮.当评论框向下滑动时,页面会摇摆不定.非常难过.用Google搜索但无法找到解决方案.
奇怪的是问题在于Chrome和Firefox. IE工作顺利……
HTML div是:…对不起,那里有很多剃刀的东西.只是忽略@s …
jQuery上下滑动这个Div.
提示赞赏! TIA.
$(".buttonAddCommentRate").click(function () {
var crBox = $(this).closest('.answer-container').find('.answer-commentRateBox');
var buttonText = $(this).text();
if (buttonText == 'Add comment/rate') {
crBox.slideDown(300);
$(this).text('Cancel comment/rate');
}
else {
crBox.slideUp(300);
$(this).text('Add comment/rate');
}
});
.answer-comment{
width:600px;
float: left;
}
.answer-textArea{
width: 500px;
height: 180px;
}
.answer-commentRateBox{
display:none;
overflow: hidden;
}
最佳答案
您遇到的问题正在发生,因为页面的高度比视口大.这意味着将出现滚动条.
将此添加到您的CSS,它可能会解决您的问题
html {
overflow-y: scroll;
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。