我无法让mCustom jQuery滚动条在iframe中运行。但我很灵活,如果有人知道任何其他对iframe可靠的滚动条插件,我会使用它(我已经尝试过所有流行的插件)。我只需要使默认滚动条看起来更现代。我已经找到了一些关于此的文章,其中有各种各样的文章。代码,但nothings似乎工作。在我的小提琴中http://jsfiddle.net/vz4k7zfy/注意我想要#TabularFrame上的滚动条,即iframe本身,而不是#InnerContainer。这是因为我需要iframe中的黑色标题保持粘性。有趣的是我的测试容器'当我使用#InnerContainer作为iframe而不是#TabularFrame时,在小提琴的下方定位。非常感谢任何帮助。
$('#TabularFrame').mCustomScrollbar({
theme: "dark-3",
axis: "yx",
scrollInertia: 500,
autoDraggerLength: false,
});

#OuterContainer {
height: 220px;
width: 550px;
padding: 10px;
border: 1px solid red;
}
#InnerContainer {
height: 170px;
width: 520px;
border: 1px solid blue;
overflow-y: hidden;
overflow-x: hidden;
Padding: 30px 0px 0px 30px;
}
#TabularFrame {
height: 140px;
width: 460px;
overflow: hidden;
}

<link href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.1/jquery.mCustomScrollbar.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.1/jquery.mCustomScrollbar.concat.min.js"></script>
<div id="OuterContainer">
<div id="InnerContainer">
<iframe id="TabularFrame" scrolling="no" src="https://c2amf323.caspio.com/dp.asp?AppKey=3eb84000d74521dad93a427d8e36">
</iframe>
</div>
</div>
&#13;