Javascript 隐藏灰烬咆哮通知时移除div

Javascript 隐藏灰烬咆哮通知时移除div,javascript,html,css,ember.js,growlnotify,Javascript,Html,Css,Ember.js,Growlnotify,我们在5秒后用css动画隐藏通知后,在余烬咆哮通知中有div…在检查元素时,仍然可以看到div。我想删除这个div元素 <div class="ember-growl-container"> {{#ember-growl-notification-placeholder as |notification close| }} <div class="ember-growl-notif

我们在5秒后用css动画隐藏通知后,在余烬咆哮通知中有div…在检查元素时,仍然可以看到div。我想删除这个div元素

  <div class="ember-growl-container">                              
     {{#ember-growl-notification-placeholder as |notification close| }}
            <div class="ember-growl-notification-item-container ember-view {{if notification.isSuccess 'ember-success' 'ember-error'}}" data-test-flash-selector={{notification.type}}>
                    {{notification.message}}
            <div class=" col-md-1 ">
                <button onclick={{action close}} class="ember-close">X</button>
            </div>
            </div>
    {{/ember-growl-notification-placeholder}}
</div>

我想我明白问题所在。使用ember growl notification在自述文件中的示例,我注意到growl的自动关闭功能没有被触发

您已经尝试使用css转换恢复隐藏特性,但css实际上并没有删除元素

试试这个

{{#ember-growl-notification-placeholder as |notification close| }}
    {{#ember-growl-notification-item type=notification.type timeout=notification.timeout}}
        {{notification.message}}
        <button onclick={{action close}} class="ember-close">X</button>
    {{/ember-growl-notification-item}}
{{/ember-growl-notification-placeholder}}
{{{#余烬咆哮通知占位符为|通知关闭}
{{{#余烬咆哮通知项类型=notification.type timeout=notification.timeout}
{{notification.message}}
X
{{/ember咆哮通知项}
{{/ember咆哮通知占位符}

咆哮声关闭后,哪个div仍然可见。既然它是隐藏的,为什么会有问题呢?@TrentonTrama在growl关闭Flash后仍然可见。您是否使用CSS转换来隐藏通知,而不是grow的内置计时器?@TrentonTrama是的,这将不起作用,因为我们需要在其中使用选择器,并且我们在其中使用div来实现自动化。i、 e data test flash selector={{notification.type}}并且它不适用于类型。您可以在通知方法周围添加标记,以添加测试flash selector{{notification.message}
{{#ember-growl-notification-placeholder as |notification close| }}
    {{#ember-growl-notification-item type=notification.type timeout=notification.timeout}}
        {{notification.message}}
        <button onclick={{action close}} class="ember-close">X</button>
    {{/ember-growl-notification-item}}
{{/ember-growl-notification-placeholder}}