Is it possible to style the new Chrome alert
boxes, added in version 29?
Run this javaScript in Chrome's console:
alert("This is new")
I ask this because the new window actually looks more like a dialog.
It also displays a tooltip with the coordinates while being dragged.
To style your alert box, you need to create a custom one first. The custom alert box will be created using jQuery and styles will be applied to CSS.
We will assign a class to the alert box, after that, we design that specific class in CSS. In this example, the class is a container. To design the button we will use the button tag in the CSS to design it. And the appeared messages also can be decorated like we attach a class and can design that too.
You can create a custom function that'll replace the native alert() box in the user's web browser. You'll do this from the window object, and the custom function will work as such: Set constants for the alert title and alert button text.
No, you cannot style dialog boxes (including the newly designed one). Use a JS/HTML modal if you need to style a popup instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With