Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting toastr opacity?

Tags:

toastr

Is there any way to change it? I tried defining the toastClass as a class with opacity set to 1, but saw no changes:

.toast-style{    opacity: 1; }  toastr.options.toastClass = 'toast-style'; 
like image 941
RobVious Avatar asked Jul 14 '13 01:07

RobVious


People also ask

What is Toastr notification?

toastr is a simple JavaScript toast notification library that is small, easy to use, and extendable. It allows you to create simple toasts with HTML5 and JavaScript like this: Simply include the files in your HTML page and write a simple line of code like this: toastr.

What is toast in CSS?

The toast component is like an alert box that is only shown for a couple of seconds when something happens (i.e. when the user clicks on a button, submits a form, etc.).


2 Answers

No JavaScript required for this. You should be able to change this in CSS using either

#toast-container > div {     opacity:1; } 

or

.toast {     opacity: 1 !important; } 
like image 160
John Papa Avatar answered Oct 04 '22 05:10

John Papa


#toast-container > div {    opacity: 1;   -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);   filter: alpha(opacity=100); } 

Test Working Example;

like image 44
Angelina Avatar answered Oct 04 '22 05:10

Angelina