Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the open property of pop-up layer in layui

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "layui pop-up layer open attribute how to use", the content is easy to understand, clear, hope to help you solve doubts, the following let Xiaobian lead you to study and learn "layui pop-up layer open attribute how to use" this article.

Layui.open properties such as: open a pop-up layer

Core method

Var index = layer.open ({type: 2, title: title, maxmin: true, offset: '100pxrabbit, area: [' 600pxrabbit, '500px`], content: url of prefix + url// iframe}); layer.full (index); / / minimize

Type-basic layer class

Type: Number, default: 0

Layer provides five layer types. The values that can be passed in are: 0 (information box, default) 1 (page layer) 2 (iframe layer) 3 (load layer) 4 (tips layer). If you call layer.open ({type: 1}), type is required (except for the information box)

Title-title

Type: String/Array/Boolean. Default: 'information'.

Title supports three types of values. If you pass in an ordinary string, such as title:'I am the title', only the title text will be changed; if you also need to customize the title area style, you can title: ['text', 'font-size:18px;'], the second item of the array can write any css style; if you do not want to display the title bar, you can title: false

Content-content

Type: String/DOM/Array, default: "

The values that can be passed into content are flexible. You can not only pass in ordinary html content, but also specify DOM, and it can also vary with different type (define a form form to pass in directly through ("# id"). The validation of dom object form has no effect, if

("# id"). Html () takes out the html element.)

Skin-style class name

Type: String, default: "

Skin allows you to pass in the built-in style class name of layer, as well as a custom class name. At present, the built-in skin of layer includes: layui-layer-lanlayui-layer-molv recommends using its own definition.

Area-width and height

Type: String/Array, default: 'auto'

By default, layer is adaptive in both width and height, but when you just want to define the width, you can area: '500pxheight, the height is still adaptive. When you want to define the width and height, you can area: ['500px', '300px']

Offset-coordinate

Type: String/Array, default: vertical horizontal center

Offset is not set by default. But if you don't want to center vertically and horizontally, you can query the official website assignment.

Maxmin-maximum and minimum.

Type: Boolean, default: false

This parameter value is valid for type:1 and type:2. The maximum size button is not displayed by default. You need to display the configuration maxmin: true

The above is all the content of the article "how to use the open attribute of the pop-up layer in layui". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report