css - 如何自定义(更改颜色、字体、图像等设计)Google Chrome 自定义导航

标签 css google-chrome

您好,当用户像这样关闭我的网站时,我正在显示确认导航

enter image description here

我使用下面的代码在我的网站中显示自定义导航

            $(document).ready(function () {
                var popit = true;
                window.onbeforeunload = function () {
                    if (popit == true) {
                        popit = false;
                        return "Are you sure you want to leave?";
                    }
                }
            });

谁能建议我如何自定义确认导航。

最佳答案

不,不可能设置这些样式,因为它们是浏览器生成的 UI。如果您希望能够设置确认框或警报的样式,则需要使用 <dialog>元素或其他一些方法 - 请注意,您将无法像使用和 alert 那样阻止浏览器卸载。或 confirm

关于css - 如何自定义(更改颜色、字体、图像等设计)Google Chrome 自定义导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34737895/

相关文章:

php - 在 php 中滚动动态 <tbody> 时固定 html 表 <thead>

java - chrome 中的 Jquery html() 编码错误

javascript - 当脚本试图使固定元素可见时,我的 JavaScript 代码在 Chrome 中崩溃

html - 在 Sencha Touch 中为不同的移动设备分辨率创建启动画面

css - 如何处理 chrome 和 firefox 中的 css top 值差异?

jquery - 下拉菜单项分布在空白区域

jquery - 我怎样才能覆盖CSS属性

css - 修改 Chrome 扩展破坏了扩展

html - css3 "new"样式 flexbox 无法在 chrome 中拉伸(stretch)文本区域

javascript - ie9中光标跳到元素上方