As shown in the below screenshot, hangout app is fully transparent and it has background-shadow applied to it as well.
I tried several approach with no luck by applying css styling to "html" and "body" tag to the page and by using "frame: none" option while creating new window, but it doesn't work.
How to make Google chrome package app like this?
Anyone have any idea?
Here is the code on which I am experimenting.
mainfest.json :
{
"manifest_version" : 2,
"name" : "Demo App",
"version" : "0.1",
"description" : "Demo Purpose",
"app" : {
"background" : {
"scripts" : ["background.js"]
}
},
"permissions" : ["experimental"]
}
background.js :
chrome.app.runtime.onLaunched.addListener(function() {
chrome.app.window.create("index.html", {
frame: "none",
id: "DemoWindow",
resizable : false,
innerBounds : {
left: 600,
maxWidth: 150,
maxHeight: 150
}
});
});
index.html :
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.title-area {
-webkit-app-region: drag;
}
html, body {
margin: 0;
padding: 0;
border: none;
outline: none;
overflow: hidden;
background-color: transparent;
}
</style>
</head>
<body>
<div class="title-area">Hello World</div>
</body>
</html>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…