<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 ...》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

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

精通Spring 4.x

精通Spring 4.x

陈雄华、林开雄、文建国 / 电子工业出版社 / 2017-1-1 / CNY 128.00

Spring 4.0是Spring在积蓄4年后,隆重推出的一个重大升级版本,进一步加强了Spring作为Java领域第一开源平台的翘楚地位。Spring 4.0引入了众多Java开发者翘首以盼的基于Groovy Bean的配置、HTML 5/WebSocket支持等新功能,全面支持Java 8.0,最低要求是Java 6.0。这些新功能实用性强、易用性高,可大幅降低Java应用,特别是Java W......一起来看看 《精通Spring 4.x》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

MD5 加密
MD5 加密

MD5 加密工具

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

UNIX 时间戳转换