1.1.0 • Published 2 years ago

ke-fullscreen v1.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
2 years ago

ke-fullscreen.js

This is a Javascript plug-in that can be used across browsers Fullscreen API.


repository

github

码云

Install

$ npm install --save ke-fullscreen

Support

Desktop

FeatureChromeEdgeFirefoxIEOperaSafari
Basic support15Yes9.01112.105.0
fullscreenEnabled20Yes10.01112.105.1

You can also visit Fullscreen API to learn more.

Simple to use

html

 <!-- import js -->
 <script src="ke-fullscreen.min.js"></script>
 <script>
     /* use
      * fullscreen as a global object.
      */
     console.log(fullscreen.isEnabled());
 </script>

css

/*
    The width and height of the dom which is passed into fullscreen.launch() as a parameter will be set to 100% in fullscreen mode.
    for example:
                fullscreen.launch(document.querySelector('#container')).
*/
#container:-webkit-full-screen {
    width: 100%;
    height: 100%;
}

#container:-moz-full-screen {
    width: 100%;
    height: 100%;
}

#container:-ms-fullscreen {
    width: 100%;
    height: 100%;
}

#container:fullscreen {
    width: 100%;
    height: 100%;
}

Package

$ gulp package

or

$ npm start

Build (development)

$ gulp package-dev

Documentation

$ gulp doc

Reference

License

MIT © porky-prince