mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
views: Add support for absolute positioned overlay views.
To test: Run `cefclient.exe --use-views --hide-frame --hide-controls` Add `--enable-chrome-runtime` for the same behavior using the Chrome location bar instead of a text field.
This commit is contained in:
@@ -2,6 +2,24 @@
|
||||
<head>
|
||||
<title>Draggable Regions Test</title>
|
||||
<style>
|
||||
html, body {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.draggable-title {
|
||||
-webkit-app-region: drag;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 34px;
|
||||
background-color: white;
|
||||
opacity: .5;
|
||||
}
|
||||
.content {
|
||||
margin-top: 34px;
|
||||
background-color: white;
|
||||
}
|
||||
.draggable {
|
||||
-webkit-app-region: drag;
|
||||
position: absolute;
|
||||
@@ -23,10 +41,13 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<body>
|
||||
<div class="draggable-title"></div>
|
||||
<div class="content">
|
||||
Draggable regions can be defined using the -webkit-app-region CSS property.
|
||||
<br/>In the below example the red region is draggable and the blue sub-region is non-draggable.
|
||||
<br/>Windows can be resized by default and closed using JavaScript <a href="#" onClick="window.close(); return false;">window.close()</a>.
|
||||
</div>
|
||||
<div class="draggable">
|
||||
<div class="nondraggable"></div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user