Node-webkit drag effects and issues

Source: Internet
Author: User

Package.json :

{"Main": "Index.html", "name": "Example", "window": {"Toolbar": false, "Frame": false}}

index.html :

<!doctype html> 

reset.css :

/** * css reset via http://meyerweb.com/eric/tools/css/reset/ */html, body,  div, span, applet, object, iframe, h1, h2, h3, h4, h5,  h6, p, blockquote, pre, a, abbr, acronym, address, big,  Cite, code,del, dfn, em, img, ins, kbd, q, s, samp, small,  strike, strong, sub, sup, tt, var, b, u, i, center, dl , dt, dd, ol, ul, li, fieldset,form, label, legend, table,  Caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas,  details, embed, figure, figcaption, footer,header, hgroup, menu, nav,  output, ruby, section, summary, time, mark, audio, video{     margin: 0;padding: 0;border: 0;font-size: 100%; font: inherit;vertical-align:  Baseline;    }article, aside, details, figcaption, figure, footer , header, hgroup, menu, nav, section{    display: block;     }body{    line-height: 1;    }ol, ul {    list-style: none;    }blockquote, q {     quotes: none;    }blockquote:before, blockquote:after, q:before , q:after{    content:  ';    content: none;     }table{    border-collapse: collapse;     border-spacing:  0;    }a{    text-decoration: none;     }

style.css :

@charset   "UTF-8";/*title bar*/header{    width:          100%;    height:          34px;    background:    -webkit-linear-gradient (Top, rgb ( 255,255,255)  0, rgb (225,225,225)  100%);    border-bottom: 1px  Solid rgb (205,205,205);     -webkit-app-region: drag;    - webkit-user-select: none;    }/*window controls*/header>ul{     float:        right;    text-align:    right;    line-height:  0;    padding-left:  6px;    }header>ul>li,header>ul>li>a{    display:  inline-block;    }header>ul{    float: right;    }header>ul> li>a{    width:               22px;    height:              22px;    margin:               6px 6px 6px 0;    background-image:    url ('./icons.svg ');    background-repeat:  no-repeat;     -webkit-transition: -webkit-transform 200ms;    -webkit-app-region:  no-drag;    }header>ul>li>a:hover,header>ul>li>a:focus{     -webkit-transform:  scale (1.22,1.22);    outline:             none;    }a#windowcontrolclose{     background-position: -44px 0;    }a#windowcontrolmaximize{     background-position: -22px 0;    }a#windowControlMinimize{     background-position: 0 0;    }


The above is the simple drag example, after the file is created, copy all the files to the Nwjs extract directory, run Nw.exe can be

This example turns from

http://nodehead.com/node-webkit-custom-window-controls-26/

Problem:

We are developing using Node-webkit v0.12.2: (May, based off of Io.js v1.2.0, Chromium 41.0.2272.76) version

Package.json

{"Main": "Index.html", "name": "Example", "window": {"Toolbar": false, "frame": false, "resizable": false Not valid}}


Using Node-webkit v0.13.0-alpha2: (June, based off of Io.js v1.5.1, Chromium 43.0.2357.45)

"resizable": false//In effect


Node-webkit drag effects and issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.