【问题标题】:Up and down arrow unicode font size issue上下箭头unicode字体大小问题
【发布时间】:2015-09-19 04:36:09
【问题描述】:

我遇到了迄今为​​止我遇到的最奇怪的问题之一。我试图在 HTML 中以 unicode 显示向上和向下箭头。但是,它们的大小和颜色并不相同。

这是一个小问题,但对我来说非常烦人和压力

<div>&#708;</div>
<div>&#8964;</div>

如果有人可以帮助我,我将不胜感激。我已经浪费了 5 个小时。

【问题讨论】:

    标签: css html unicode


    【解决方案1】:

    您没有使用正确的箭头对。使用&amp;#709; 实体作为对应的向下箭头。

    查看更新的fiddle

    <div>&#708;</div>
    <div>&#709;</div>

    如果您对实心箭头感兴趣

    Demo

    <div>&#9650;</div>
    <div>&#9660;</div>

    【讨论】:

    • 谢谢图沙尔!! 5小时后终于:D
    【解决方案2】:

    它们是不同的。它不是字体大小问题。 http://graphemica.com/%CB%84 http://graphemica.com/%E2%8C%84

    您应该使用引导程序字形图标 http://jsfiddle.net/c9gp9a1w/

    <span class="glyphicon glyphicon-chevron-up" aria-hidden="true"></span>
    <span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span>
    

    引导 http://getbootstrap.com/components/#glyphicons

    【讨论】:

    • glyphicon 是最好的,但是如果我将它用作 jquery html() 函数,我的主 div 将停止获取点击处理程序 :( 可能适合新问题。
    • 您是否要在点击时更改箭头?你可以用字形图标来做到这一点。您可以执行以下操作: $('#menu-toggle').click( function(){ $(this).find('i').toggleClass('glyphicon-arrow-right').toggleClass('glyphicon-左箭头'); });
    • 我正在使用 jqxsplitter 库,它在主按钮上有事件。如果我在其中保留 span 标签并单击主按钮,它将永远不会收到任何事件。
    【解决方案3】:

    它们不是匹配的对。

    ˄ 与 ˅ 匹配。 而 ⌄ 与 ⌃ 匹配。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-12-23
      • 1970-01-01
      • 2015-11-11
      • 1970-01-01
      • 2023-03-07
      • 2021-06-13
      • 2021-08-22
      • 2011-03-28
      相关资源
      最近更新 更多