2

I'm using gritter.js to notificate success or error messages. It works but the "X" close-icon remains hidden. I check in CSS rules of the element, they are all right but having no effects.

<script src="/components/jquery.gritter/js/jquery.gritter.js"></script>
<link rel="stylesheet" href="/components/jquery.gritter/css/jquery.gritter.css" />

  /*some other code*/
  switch (window.location.hash) {
    case "#success":
    $.gritter.add({
      title: 'Molto bene!',
      text: "L'operazione è stata eseguita con successo!",
      sticky: true,
      class_name: 'gritter-success gritter-light'
    });
    break;
    case "#error":
    $.gritter.add({
      title: 'Oops!',
      text: "Qualcosa è andato storto. L'operazione non è stata eseguita!",
      class_name: 'gritter-error gritter-light'
    });
    break;
  }

The js produce an icon like: <a style="display: none;" class="gritter-close" href="#" tabindex="1">Close Notification</a>

And the css rules are:

.gritter-light .gritter-close {
    background-image: none;
    color: #444;}

//applied onhover
elemento {
    display: block;}
4

1 回答 1

0

可能有点晚了,但是否可以让您也使用 ace 模板。

我最近遇到了同样的问题。原来 ace 模板有一个 css 规则,将 gritter 关闭图标的字体大小设置为零。简单地覆盖该 css 规则就为我解决了这个问题。

于 2016-08-04T11:32:05.107 回答