Giter Club home page Giter Club logo

wonderland-popup's Introduction

Wonderland-PopUP

这是一个原生JavaScript编写的弹窗插件,v1.0.0版本支持最基本的自定义文本和超时。

使用方法:

安装

CDN:

# js
在<body>标签内使用
https://cdn.jsdelivr.net/gh/sooooooooooooooooootheby/Wonderland-PopUP/src/pop-up.js

在<head>标签内使用
# css
https://cdn.jsdelivr.net/gh/sooooooooooooooooootheby/Wonderland-PopUP/src/pop-up.css

使用

弹窗1


<button click="popup('ciallo (∠・ω )⌒★', 3000, #000000)">ciallo (∠・ω )⌒★</button>

popup('ciallo (∠・ω )⌒★', 3000, #000000) 第一个参数是文本内容,第二个是超时时间(单位ms),如果不设置默认3000ms(3s)

窗口1

# 通过按钮触发
<button onclick="win({text: '输入你需要显示的文本'})">按钮2</button>

# 在页面加载完成后触发
document.addEventListener("DOMContentLoaded", function () {
    win({
        text: "输入你需要的文本",
    });
});

更新日志

v1.0.1

更新了颜色参数。 popup('ciallo (∠・ω )⌒★', 3000, #000000)新增的第三个参数是背景颜色参数,如果不设置默认为#869379

v1.0.2

更新了窗口1

wonderland-popup's People

Contributors

sooooooooooooooooootheby avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.