0.1.2 • Published 6 years ago
defram v0.1.2
defram
CSS device frames.
Demo
Get started
Download and add the distributed CSS to the head of your document.
<link rel="stylesheet" href="/css/defram.min.css">Or use CDN like jsDelivr.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/defram/dist/defram.min.css">Usage
More examples on demo page.
Default is medium sized white phone with portrait orientation.
<div class="device">
<img src="..." alt="">
</div>Enable image scrolling with .device-scroll and extra nested div.
<div class="device device-scroll">
<div>
<img src="..." alt="">
</div>
</div>Embed iframe with live resource.
<div class="device device-scroll">
<iframe src="..."></iframe>
</div>Modificator classes
device-tabletdevice-laptopdevice-desktopdevice-landscapedevice-scroll(extra nesteddivrequired)device-scroll-thindevice-blackdevice-silverdevice-button-rounddevice-button-squaredevice-button-longdevice-xxsdevice-xsdevice-sdevice-ldevice-xldevice-xxl
Browser Support
- IE 10+ (CSS
object-fitis not supported, so image can be distorted) - Edge
- Up-to-date versions of Chrome, Firefox, Opera, Safari
- iOS 6+
- Android 4+