代码之家  ›  专栏  ›  技术社区  ›  melvin

从jQuery UI对话框中删除特定样式

  •  0
  • melvin  · 技术社区  · 6 年前

    作为jQuery UI对话框中文本的一部分的链接使用类从UI css中获取黑色 ui-widget-content . 我可以覆盖并对内容应用新颜色。但是我希望css不应用于链接。删除该类不适用。

    .ui-widget-content a{
        color : #ffffff;
    }
    
    1 回复  |  直到 6 年前
        1
  •  0
  •   95faf8e76605e973    6 年前

    这可能有助于解决这个问题。请参阅下面我编写的CSS

    .ui-widget-content > a:link, .ui-widget-content > a:visited{
        color : #ccc;
    }
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.css">
    
    <div class="ui-widget-content">
    <p>paragraph</p>
    <a href="#"> this is a link because it has an href attr</a>
    </div>