Home>Article>Web Front-end> How to use layui framework

How to use layui framework

angryTom
angryTom Original
2019-08-01 13:15:47 7431browse

How to use layui framework

layui(homophone: UI-like) is a front-end UI framework written using its own module specifications, following the writing and organization form of native HTML/CSS/JS , the threshold is extremely low and you can use it right out of the box. But if you want to use it, you must follow his rules. After all, that person has short hands and can do some tricks, which is also within the rules.

If you want to know more about layui, you can click:layui tutorial

Attached is the layui official website : https://www.layui.com/

How to use layui framework

After downloading, we will unzip it and take out the layui folder. Open the editor and drop it in.

How to use layui framework

Then start introducing css files and js files into html. What we need here are the two layui core files layui.css and layui.js.

    Title   
//模块和回调函数

At this point, we also need to declare the modules and callback functions we need to use. Of course, just refer to the official documentation and choose the effect you want! !

For example:

How to use layui framework

Next we will end with an example

How to use layui framework

I gave an example in the official document navigation:

How to use layui framework

You read that right, I just copied it, and then

    Title   

There is no more, just like this, the effect is achieved...

How to use layui framework

The above is the detailed content of How to use layui framework. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn