Is there an upside down caret character?

后端 未结 17 2072
Happy的楠姐
Happy的楠姐 2020-12-07 07:27

I have to maintain a large number of classic ASP pages, many of which have tabular data with no sort capabilities at all. Whatever order the original developer used in the d

17条回答
  •  盖世英雄少女心
    2020-12-07 08:04

    There is no upside down caret character, but you can easily rotate the caret with CSS. This is a simple solution that looks perfect. Press 'Run code snippet' to see it in action:

    .upsidedown {
    transform:rotate(180deg); 
    -webkit-transform:rotate(180deg);
    -o-transform:rotate(180deg);
    -ms-transform:rotate(180deg);
    }
    .upsidedown.caret {
    display: inline-block; 
    position:relative; 
    bottom: 0.15em;
    }
    more items ^

    Please note the following...

    • I did a little correction for the positioning of the caret, as it is normally high (thus low in the rotated version). You want to move it a little up. This 'little' is relative to the font-size, hence the 'em'. Depending on your font choice, you might want to fiddle with this to make it look good.
    • This solution does not work in IE8. You should use a filter if you want IE8 support. IE8 support is not really required nor common in 2018.
    • If you want to use this in combination with Twitter Bootstrap, please rename the class 'caret' to something else, like 'caret_down' (as it collides with a class name from Twitter Bootstrap).

提交回复
热议问题