layui tab effect implementation code

韦小宝
Release: 2023-03-19 14:12:01
Original
2688 people have browsed it

This article mainly introduces the implementation code of layui pop-up layer effect in detail. It has certain reference and value for learning layui. Friends who are interested in layui can refer to this article

The example in this article shares the specific code of the layui tab for your reference. The specific content is as follows

    选项卡  
  
默认风格的Tab

  • 网站设置
  • 用户管理
  • 权限分配
  • 商品管理
  • 订单管理

1. 高度默认自适应,也可以随意固宽。
2. Tab进行了响应式处理,所以无需担心数量多少。

内容2

内容3

内容4

内容5

动态操作Tab

  • 网站设置
  • 用户管理
  • 权限分配
  • 商品管理
  • 订单管理

内容1

内容2

内容3

内容4

内容5

Hash地址定位

  • 网站设置
  • 用户管理
  • 权限分配
  • 商品管理
  • 订单管理

点击该Tab的任一标题,观察地址栏变化,再刷新页面。选项卡将会自动定位到上一次切换的项

内容2

内容3

内容4

内容5

简洁风格的Tab

  • 网站设置
  • 用户管理
  • 权限分配
  • 商品管理
  • 订单管理

内容不一样是要有,因为你可以监听tab事件(阅读下文档就是了)

内容2

内容3

内容4

内容5

卡片风格的Tab

  • 网站设置
  • 用户管理
  • 权限分配
  • 商品管理
  • 订单管理

默认宽度是相对于父元素100%适应的,你也可以固定宽度。

2

3

4

5

6

当Tab数超过一定宽度

  • 网站设置
  • 用户管理
  • 权限分配
  • 商品管理
  • 订单管理

1. 宽度足够,就不会出现右上图标;宽度不够,就会开启展开功能。
2. 如果你的宽度是自适应的,Tab会自动判断是否需要展开,并适用于所有风格。

2

3

4

5

6

带删除功能的Tab

  • 网站设置
  • 用户基本管理
  • 权限分配
  • 商品管理
  • 订单管理

1. 我个人比较喜欢卡片风格的,所以你发现又是以卡片的风格举例 2. 删除功能适用于所有风格

2

3

4

5

6

Copy after login


##Rendering:

The above is all the content of this article. I hope it can help everyone learn layui! !

Related recommendations:

layui table example sharing

layui tab effect code sharing

jQuerylayui Common Method Example Sharing

The above is the detailed content of layui tab effect implementation code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!