css - 样式化 Jquery UI 选项卡导航

标签 css jquery-ui-tabs

有谁知道如何在 CSS 中做到这一点?

Navigation tab image

这是用于 jQuery UI 选项卡的导航选项卡。我无法让 border-radius 工作。目前,我可以做这个形状,但左上角和右上角没有半径。

    border-right: 47px solid transparent;   
    border-bottom: 35px solid #415049;
    border-left: 15px solid transparent;    
    -webkit-border-radius: 5px 5px 0 0px;
    -moz-border-radius: 5px 5px 0 0px;
    border-radius: 5px 5px 0 0px;   
    height: 0;  
    background:none;

如有任何帮助,我们将不胜感激。

最佳答案

这是你的答案

如果你想要这样的形状使用 :before :after

我已经为你创建了 fiddle

这是代码

HTML

<div><span></span></div>

CSS

div > span {
    background-color: #333333;
    border-radius: 6px;
    display: inline-block;
    height: 50px;
    width: 200px;
}

div {
    display: inline-block;
    height: 43px;
    overflow: hidden;
    padding: 0 106px 0 46px;
    position: relative;
    width:
}
div:after {
    background-color: #333333;
    border-radius: 10px;
    content: " ";
    height: 100px;
    position: absolute;
    right: 44px;
    top: 15px;
    transform: rotate(30deg);
    width: 100px;
}
div:before {
    background-color: #333333;
    border-radius: 8px;
    content: " ";
    height: 50px;
    left: 39px;
    position: absolute;
    top: 6px;
    transform: rotate(15deg);
    width: 50px;
}

这是给你的 fiddle http://jsfiddle.net/96sv3/2/

希望这对你有帮助:)

关于css - 样式化 Jquery UI 选项卡导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21571487/

相关文章:

html - 如何将 max-width 应用于文本 div,但让 div 只扩展到它必须扩展的程度?

javascript - 如何将选项卡设置为选中

选项卡的 CSS 构建器

jquery ui 选项卡 : get width of nested tabs on creation

javascript - JQuery 垂直选项卡 - 创建选项卡的附加链接

javascript - 悬停时淡出元素并允许用户选择下面的文本 - 可能吗?

html - 更改 HTML 和 CSS 中的按钮位置?

css - Sass 中的焦点选择器

css - 如何删除 Wordpress 页脚下的空白区域?

jquery 访问器 id 与类?