【问题标题】:Bootsfaces scrollUp and GliphiconBootsfaces 向上滚动和 Glyphicon
【发布时间】:2017-09-11 19:17:15
【问题描述】:

我正在处理一个使用 BootsFaces 1.1.3 的 JSF 项目

我已经尝试了以下没有运气

<b:scrollUp text="" distance="150" class="glyphicon glyphicon-chevron-up"/>

如何使用 b:scrollUp 设置字形图标?

【问题讨论】:

    标签: jsf jsf-2 bootsfaces


    【解决方案1】:

    我还没有尝试过,但是根据插件的文档,您必须设置属性image="true"。图像本身必须在 CSS sn-p 中定义:

    #scrollUp {
        background-image: url("../../img/top.png");
        bottom: 20px;
        right: 20px;
        width: 38px;    /* Width of image */
        height: 38px;   /* Height of image */
    }  
    

    要使用 Glyphicon,这可能是查找 Glyphicon 定义并将其复制到 CSS sn-p 中的最佳方法:

        .glyphicon {
          position: relative;
          top: 1px;
          display: inline-block;
          font-family: 'Glyphicons Halflings';
          font-style: normal;
          font-weight: normal;
          line-height: 1;
          -webkit-font-smoothing: antialiased;
          -moz-osx-font-smoothing: grayscale;
        }
        .glyphicon-chevron-up 
        { 
           &:before { content: "\e113"; } 
        }
    

    【讨论】:

      猜你喜欢
      • 2015-07-17
      • 2017-04-04
      • 2018-11-12
      • 1970-01-01
      • 2013-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多