Display first few lines of an article when hovering over it?

답변함

2 댓글

  • Ifra Saqlain
    댓글 작업 고유 링크

    Yes, it's possible.

    See how I did on category page articles:

      {{#each articles}}
    <li class="article-list-item">
    <a href="{{url}}" class="article-list-link" title="{{title}}">{{title}}</a>
    <div class="show-on-hover"> {{excerpt body characters=100}} </div>
    </li>
    {{/each}}

    <style>
    .show-on-hover{
    display:none;
    }
    .article-list-item:hover .show-on-hover{
    display:block;
    }
    </style>

     

    here, you can add excerpt body for article and add limit of words to show on mouse hover.

    <div class="show-on-hover"> {{excerpt body characters=100}} </div>

     

    Now you can create the UI for article description's few lines.

     

    Thank You

    Team

     

    1
  • Anton Van der meyden
    댓글 작업 고유 링크

    Hello Ifra,

    Ifra Saqlain

    Thank you for the reply. I have been away and only got to view your response now.

     

    Kind Regards,

    Anton

     

    0

댓글을 남기려면 로그인하세요.

Zendesk 제공