gpt4 book ai didi

c# - 在 TabContainer 中定位选项卡

转载 作者:太空宇宙 更新时间:2023-11-03 14:17:44 24 4
gpt4 key购买 nike

我正在使用 ajaxtoolkit:TabContainer

我需要添加两个选项卡(我可以做到),但我需要最左侧的一个选项卡标题和最右侧的另一个选项卡标题。

我一直在玩 CSS(float:left; etc;),但我无法将它们分开!他们总是表现出一个接一个地粘在一起。

是否可以分隔标签页眉?

编辑:

正如@1stein 评论的那样,我可以使用

.ajax__tab_header :nth-child(2) { float: right !important; } 

这样就可以了。问题是,此解决方案在我定位的浏览器 IE8 中不起作用。是否有任何解决方法?

最佳答案

您可以使用这种风格(在 IE 9th 以下版本中不起作用):

.ajax__tab_header :nth-child(2)
{
float: right !important;
}

或者您可以通过 javascript 应用样式(在 ScriptManager 的正下方):

<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(pageLoaded);

function pageLoaded(sender, args) {
$get("<%= TabPanel2.ClientID %>_tab").setAttribute("style", "float:right");
}
</script>

其中 TabPanel2 是您需要向右移动的 TabPanel 的 ID。

关于c# - 在 TabContainer 中定位选项卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6218514/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com