0.0.1 • Published 7 years ago

mac-window v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

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