有人知道用纯 JavaScript 构建的小型、功能有限的灯箱吗?这是一个可嵌入的小部件,因此不使用 jquery 的原因.我真正需要的是为特定的 div 创建一个叠加层,或者只是传递一些 HTML.
Does anyone know of a small, limited functionality lightbox built with pure javascript? This is for an embeddable widget, thus the reason of not using jquery. All I really need is creating an overlay for a specific div or simply by passing some HTML.
有一个很棒的灯箱列表/比较 这里.您可以快速扫描哪些需要 JS 库(jQuery、MooTools 等)哪些不需要,还可以查看每个支持的功能.其中有相当大的一部分不使用任何 JS 库,因此您应该能够轻松找到满足您需求的一个.
There's a great list/comparison of lightboxes here. You can quickly scan which require a JS library (jQuery, MooTools, etc.) and which don't, and you can also see what features each supports. There's a sizable chunk of them that don't use any JS library, so you should be able to easily find one to suit your needs.
这里有一些可以帮助您入门:
Here's a few to get you started:
这篇关于简单&小的纯javascript灯箱(对话框覆盖)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在 Angular 2/Typescript 中使用 IScrollUse IScroll in Angular 2 / Typescript(在 Angular 2/Typescript 中使用 IScroll)
Anime.js 在 Ionic 3 项目中不起作用anime.js not working in Ionic 3 project(Anime.js 在 Ionic 3 项目中不起作用)
Ionic 3 - 使用异步数据更新 ObservableIonic 3 - Update Observable with Asynchronous Data(Ionic 3 - 使用异步数据更新 Observable)
Angular 2:在本地 .json 文件中找不到文件Angular 2: file not found on local .json file(Angular 2:在本地 .json 文件中找不到文件)
在 Ionic 2 中,如何创建使用 Ionic 组件的自定义指In Ionic 2, how do I create a custom directive that uses Ionic components?(在 Ionic 2 中,如何创建使用 Ionic 组件的自定义指令?)
将 ViewChild 用于动态元素 - Angular 2 &离子2Use ViewChild for dynamic elements - Angular 2 amp; ionic 2(将 ViewChild 用于动态元素 - Angular 2 amp;离子2)