如何在选项卡容器(非垂直滚动条)中创建水平ScrollBar [英] How to Create A Horizontal ScrollBar in Tab Container (Not Vertical Scrollbar)
问题描述
大家好,
我想在标签溢出时为Ajax Tab Container创建一个水平滚动条。我可以为它创建一个垂直滚动条,但我想要水平滚动条。
当前输出:(见这里: < a href =http://i.stack.imgur.com/I4D2r.png> http://i.stack.imgur.com/I4D2r.png [ ^ ])
计划实现:(请参阅此处: http://i.stack.imgur.com/ bUnK4.png [ ^ ])
这是我的代码:
Hi Members,
I would like to create a horizontal scrollbar for Ajax Tab Container when tabs overflow. I can create a vertical scrollbar for it but I want horizontal scrollbar instead.
Current Output: (See here: http://i.stack.imgur.com/I4D2r.png[^])
Plan to Achieve: (See here: http://i.stack.imgur.com/bUnK4.png[^])
This is my codes:
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
$(function () {
$(".ajax__tab_header").html("<div style='height:80px;width:1200px;' >" + $(".ajax__tab_header").html() + "</div>");
})
</script>
<style>
.ajax__tab_header {
height: 40px !important;
width: 200px;
overflow: scroll;
overflow-y: hidden;
}
</style>
问题:如何创建水平滚动条,不是当标签溢出时,垂直滚动条。
感谢有人可以帮助我,非常感谢!!
问候,
Felicia
Question: How to create a horizontal scrollbar, not vertical scrollbar when tabs overflow.
Appreciate if someone can help me on this, thanks a lot!!
Regards,
Felicia
推荐答案
( function (){
( .ajax__tab_header)。html( < div style ='height:80px; width:1200px;'> +
(".ajax__tab_header").html("<div style='height:80px;width:1200px;' >" +
( 。ajax__tab_header)。html()+ < / div>);
})
< / script >
< 样式 >
。 ajax__tab_header {
height : 40px !important ;
width : < span class =code-keyword> 200px;
溢出 : < span class =code-keyword> scroll;
overflow-y : 隐藏;
}
< / style >
(".ajax__tab_header").html() + "</div>"); }) </script> <style> .ajax__tab_header { height: 40px !important; width: 200px; overflow: scroll; overflow-y: hidden; } </style>
问题:如何创建水平滚动条,不是当标签溢出时,垂直滚动条。
感谢有人可以帮助我,非常感谢!!
问候,
Felicia
Question: How to create a horizontal scrollbar, not vertical scrollbar when tabs overflow.
Appreciate if someone can help me on this, thanks a lot!!
Regards,
Felicia
这篇关于如何在选项卡容器(非垂直滚动条)中创建水平ScrollBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!