繁体   English   中英

Laravel yoeunes/toastr 获得白色背景和白色文本

[英]Laravel yoeunes/toastr getting white background and white text

我使用的是 laravel 7。在这里我使用了 yoeunes/toastr ( https://packagist.org/packages/yoeunes/toastr )。 但是toastr的背景色和文字色是白色的。 还尝试了其他吐司。 发生同样的事情。 当我删除所有布局文件(js、jquery、css 链接的头文件)时,toastr 工作正常。但是对于布局文件,toastr 不起作用。

这是警报

我使用代码作为文档

在您的布局文件(js、jquery、css 链接的头文件)之后使用 @toastr_css。 扩展布局后,在像这样的部分部分使用@toastr_css

 @extends('layouts')
 @section('content')
 @toastr_css
 ....your code....
 
 @jquery
 @toastr_js
 @toastr_render
 @endsection

那么它不会影响您的布局文件

作为替代方案,您可以在 site.css 中使用以下代码:

/***toastr - NOTIFICATION **************************************************/

.toast-success {
    background-color: #51a351 !important;
}

.toast-error {
    background-color: #bd362f !important;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM