所以我有一个非常具体的设计,涉及一个盒子内的2列.
左列将保持在框的高度范围内,但右列将更长,因此需要滚动.我正在使用bootstrap,需要在没有左侧移动的情况下滚动右列.
我已经尝试过让盒子溢出:滚动但显然会滚动两列.有任何想法吗?
这是代码:
HTML:
<div class="fluid-container">
<div class="row">
<div class="col-xs-12 outer">
<div class="row">
<div class="col-xs-4 leftcol">
This content needs to stay put while scrolling (aka fixed)
</div>
<div class="col-xs-8 rightcol">
This content Scrolls<br>This content Scrolls<br>
This content Scrolls<br>This content Scrolls<br>
This content Scrolls<br>This content Scrolls<br>
This content Scrolls<br>This content Scrolls<br>
This content Scrolls<br>This content Scrolls<br>
This content Scrolls<br>This content Scrolls<br>
This content Scrolls<br>This content Scrolls<br>
This content Scrolls<br>This content Scrolls<br>
</div>
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
.outer {
border:solid …Run Code Online (Sandbox Code Playgroud) 我绑定了两个单独的事件进行测试,但无论出于何种原因,当我选择文件时,它们都没有触发。我确信我今天没有喝足够的咖啡,但这似乎是检测文件选择的正确方法。
HTML:
<input type="file" id="files">
Run Code Online (Sandbox Code Playgroud)
JS:
$(document).on("ready", function() {
$("#files").on("change", function() {
alert("Files changed.");
});
$(document).on("change", "#files", function() {
alert("Files changed.");
});
});
Run Code Online (Sandbox Code Playgroud)
示例: https: //jsfiddle.net/snoapps/66y45hjh/