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

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

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

查看所有标签

猜你喜欢:

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

Ajax基础教程

Ajax基础教程

(美)阿斯利森、(美)舒塔、金灵 / 金灵 / 人民邮电出版社 / 2006-02-01 / 35.00元

Ajax技术可以提供高度交互的Web应用,给予用户更丰富的页面浏览体验。本书重点介绍Ajax及相关的工具和技术,主要内容包括XMLHttpRequest对象及其属性和方法、发送请求和处理响应、构建完备的Ajax开发工具、使用JsUnit测试JavaScript、分析JavaScript调试工具和技术,以及Ajax开发模式和框架等。本书中所有例子的代码都可以从Apress网站本书主页的源代码(Sou......一起来看看 《Ajax基础教程》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具