【问题标题】:How add a downarrow after an element with CSS? [duplicate]如何在带有 CSS 的元素后添加向下箭头? [复制]
【发布时间】:2013-10-22 22:26:44
【问题描述】:

我想在this page上的可排序表中添加箭头

我尝试的是将此代码添加到 css:

table th.headerSortUp:after {
   content: " ↑";
}

table th.headerSortDown:after {
   content: " ↓";
}

但这不会显示箭头"↑" and "↓",而是显示html-entities:"↑" and "↓"

或者更好的是我在这里找到的向上和向下箭头: http://graphemica.com/search?q=ARROW+TO+BAR

【问题讨论】:

    标签: css


    【解决方案1】:

    尝试改用他们的 unicode 位置

    table th.headerSortUp:after {
       content: " \2191";
    }
    
    table th.headerSortDown:after {
       content: " \2193";
    }
    
    table th:after {
       color: #123456;
    }
    

    有关其他箭头符号,请参阅 http://www.blooberry.com/indexdot/html/tagpages/entities/arrow.htm

    【讨论】:

    猜你喜欢
    • 2021-11-21
    • 1970-01-01
    • 2016-03-30
    • 2010-10-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-02
    • 1970-01-01
    相关资源
    最近更新 更多