responsive-iframe
v0.0.1
Published
Keeps iframes in correct aspect ratios
Downloads
23
Maintainers
Readme
Basic Responsive iFrames
Provides a zero-configuration method of creating responsive iframes.
Installation
npm
npm install responsive-iframe
yarn
yarn add responsive-iframe
Manually
- Download https://github.com/OwenMelbz/responsive-iframe/archive/master.zip
Usage
npm/webpack/rollup/etc
require('responsive-iframe')
- Embed your iframe, and add a height/width element (this acts as an aspect ratio)
Manually
- Include
responsive-frame.js
into your project - Embed your iframe, and add a height/width element (this acts as an aspect ratio)
Configuration
- If you want to exclude an iframe from resizing, add
.dont-resize
class to your element