在Chrome打包的应用中自定义标题栏 [英] customize title bar in chrome packaged app

查看:84
本文介绍了在Chrome打包的应用中自定义标题栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法可以在chrome打包的应用中自定义标题栏?我需要添加一些文本并更改背景颜色.

Is there a way to customize title bar in chrome packaged app? I need to add some text and change the color of background.

我搜索类似的内容(可自定义滚动条):

I search something like this (which customizes scrollbar):

::-webkit-scrollbar {
width: 15px;
background: #fcfcfc;
    }
::-webkit-scrollbar-thumb {
    background: #a5d0ff;
    -webkit-border-radius: .8ex;
}

推荐答案

我认为没有针对应用程序标题栏的CSS选择器,但是您根本不需要在其中使用系统标题栏.Chrome应用.

I don't think there are any CSS selectors which target the application's title bar, but you don't have to use the system title bar at all in a Chrome app.

您可以在创建窗口时在选项对象中指定 frame:"none" -这将完全删除标题栏,并且可以使用HTML和CSS添加自己的标题栏内容和样式.

You can specify frame: "none" in the options object when you create your window -- that will completely remove the title bar, and you can add your own, using HTML and CSS for content and styling.

演示应用程序:链接

这篇关于在Chrome打包的应用中自定义标题栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆