Fade in tabs in Zurb Foundation?

前端 未结 8 717
清歌不尽
清歌不尽 2021-01-03 03:04

I\'m trying to figure out if there\'s setting to fade in tabs nicely in Zurb Foundation.

If not, does anyone know the best way to achieve this manually?

Wha

8条回答
  •  北海茫月
    2021-01-03 03:43

    Using Zurb v5 and this post I was able to accomplish fading tabs by adding the Customized parts in foundation.css as follows:

    .tabs-content {
      *zoom: 1;
      margin-bottom: 1.5rem; 
    
      /* Customized */
      display:block:important!
      opacity: 0;
    }
      /* Customized */
      @-webkit-keyframes fadeIn {
          from { opacity: 0; }
            to { opacity: 1; }
      }
      @keyframes fadeIn {
          from { opacity: 0; }
            to { opacity: 1; }
      }
      .tabs-content:before, .tabs-content:after {
        content: " ";
        display: table; }
      .tabs-content:after {
        clear: both; }
      .tabs-content > .content {
        display: none;
        float: left;
        padding: 0.9375rem 0; }
        .tabs-content > .content.active {
    
          /* Customized */
          -webkit-animation: fadeIn 1s;
          animation: fadeIn 1s;
          opacity: 1;
    
          display: block; }
    

提交回复
热议问题