<lite-iframe/> - A web component which enhances UX by lazy loading iframes and providing a ...

栏目: IT技术 · 发布时间: 4年前

内容简介:A web component which enhances user experience by lazy loading iframes and providing a better fallback user interface

<lite-iframe/> - A web component which enhances UX by lazy loading iframes and providing a ...

<lite-iframe />

A web component which enhances user experience by lazy loading iframes and providing a better fallback user interface

View Demo · Report Bug · Request Feature

About The Project

Built With

Getting Started

To get a local copy up and running follow these simple steps.

  1. Install NPM packages
npm install lite-iframe
  1. Include the lite-iframe component file in your project root.
import 'lite-iframe';

OR

  1. You can include unpkg CDN link in the project file.
<script
  src="https://unpkg.com/lite-iframe@0.2.0/dist/lite-iframe.esm.js"
  type="module"
></script>

Usage

You can use lite-iframe like normal iframe.

<!-- Codepen -->
<lite-iframe
  scrolling="no"
  title="Piccalilli CSS Utility — Issue  #2 — Full bleed utility"
  src="//codepen.io/andybelldesign/embed/Nmxrwv/?height=300&theme-id=dark&default-tab=css,result"
  frameborder="no"
  allowtransparency="true"
  allowfullscreen="true"
>
</lite-iframe>

<!-- Youtube -->
<lite-iframe
  type="youtube"
  src="https://www.youtube.com/embed/lzQyH-nX0u0"
></lite-iframe>

For live example, please see the demo

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated .

git checkout -b feature/AmazingFeature
git commit -m 'Add some AmazingFeature'
git push origin feature/AmazingFeature

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Annamalai Saravanan - @asvny_

Project Link: https://github.com/asvny/lite-iframe

Acknowledgements


以上所述就是小编给大家介绍的《 - A web component which enhances UX by lazy loading iframes and providing a ...》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

PHP项目开发全程实录

PHP项目开发全程实录

清华大学出版社 / 2008 / 56.00元

《软件项目开发全程实录丛书•PHP项目开发全程实录:DVD17小时语音视频讲解(附光盘1张)》主要特色: (1)12-32小时全程语音同步视频讲解,目前市场上唯一的“全程语音视频教学”的案例类 图书,培训数千元容,尽在一盘中! (2)10套“应用系统”并公开全部“源代码”,誓将案例学习进行到底! (3)丛书总计80个应用系统300个应用模块。 (4)含5000页SQL se......一起来看看 《PHP项目开发全程实录》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

SHA 加密
SHA 加密

SHA 加密工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换