JavaScript HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
example/webpack
images
lib
src/styles
test
.babelrc
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
LICENSE.md
README.md
bower.json
bs-config.js
build.js
dev-server.js
package.json
prod.js
rollup.config.js
yarn.lock

README.md

MacWindow

Elements like mac's window.

screenshot

Install or Download

yarn add mac-window
npm i -S mac-window

Or access to releases page. Then, download the latest version.

Usage

First, if you read as a separate file.

<script src="/path/tp/mac-window.js"></script>

Markup and script are like this.

<div id="mac-window" style="
  position: relative;
  width: 100%;
  height: 70vh;
">
  <!-- Inner contents -->
</div>
// For es
import MacWindow from 'mac-window';
new MacWindow({target: document.getElementById('mac-window')});

As an important point, there are only two. It is to specify the position:relative and the size (width, height, ...) as the container element.

Then, please adjust so that the inner element is just fine.

Example

  • test/fixtures/index.js
  • example/webpack/index.js

LICENSE

The MIT License (MIT)

Copyright (c) 2017 nju33 nju33.ki@gmail.com