将不透明度转换添加到jQuery函数

时间:2016-09-02 20:27:51

标签: javascript jquery html css css3

我是JS noobie,我在弹出式叠加层中添加不透明度转换时遇到问题。

原始的jQuery是:

<script>
jQuery(function ($) {
  $('.check-balance').click(function (e) {
    $('.giftcard.discount').modal({
         containerCss:{
                    backgroundColor:'#fff',
                    borderWidth:1,
                    borderColor:'#000',
                    height:'335px',
                    width:'400px'
                },
                 dataCss:{
                    padding:'20px'
                },
                overlayCss:{
                    backgroundColor:'#000'

                },
                opacity:25,   
    });
    return false;
  });
});
</script>

它影响了这一点HTML:

<span class="GClinks"><a href="#" class="check-balance">CHECK YOUR BALANCE</a></span>

我尝试了this post(和其他一些人)的答案,但没有尝试:

<script>
jQuery(function ($) {
  $('.check-balance').click(function (e) {
    $('.giftcard.discount').modal({
         containerCss:{
                    backgroundColor:'#fff',
                    borderWidth:1,
                    borderColor:'#000',
                    height:'335px',
                    width:'400px'
                },
                 dataCss:{
                    padding:'20px'
                },
                overlayCss:{
                    backgroundColor:'#000'

                },
                opacity:25,
                WebkitTransition:'opacity 1s ease-in-out',
                MozTransition:'opacity 1s ease-in-out',
                MsTransition:'opacity 1s ease-in-out',
                OTransition:'opacity 1s ease-in-out',
                transition:'opacity 1s ease-in-out'

    });
    return false;
  });
});
</script>

我确定它很简单,但你知道......当你成为一个noobie时,一切都是挑战!大声笑

提前致谢! :)

0 个答案:

没有答案