简体   繁体   English

在 chrome 打包的应用程序中自定义标题栏

[英]customize title bar in chrome packaged app

Is there a way to customize title bar in chrome packaged app?有没有办法在 chrome 打包的应用程序中自定义标题栏? 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;
}

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.我认为没有任何针对应用程序标题栏的 CSS 选择器,但您根本不必在 Chrome 应用程序中使用系统标题栏。

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

Demo app: link演示应用程序: 链接

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

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