跳转到内容
打开/关闭搜索
搜索
打开/关闭菜单
6
条目
7
文件
13
用户
684
编辑
久远澪Wiki
导航
首页
最近更改
随机页面
MediaWiki帮助
特殊页面
打开/关闭外观设置菜单
无法加载偏好设置。请检查您的网络连接并重试。
重试
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
创建账号
登录
查看“︁Module:TextEffect”︁的源代码
来自久远澪Wiki
查看
阅读
查看源代码
查看历史
associated-pages
模块
讨论
更多操作
更多
工具
链入页面
相关更改
页面信息
←
Module:TextEffect
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
此页面已受到保护,不能编辑,因为它被嵌入以下开启“连锁保护”选项的页面:*
首页
您可以查看和复制此页面的源代码。
-- Module:TextEffect -- 解析文字背景效果串(如「毛玻璃+遮罩」「阴影 + 遮罩」「遮罩+毛玻璃」), -- 顺序无关、容忍空格,输出 CSS 类名(.text-bg-*)。 -- 用法:{{#invoke:TextEffect|class|毛玻璃+遮罩+阴影}} local p = {} -- 效果名 → 类名(支持常见别名) local classMap = { ['毛玻璃'] = 'text-bg-glass', ['玻璃'] = 'text-bg-glass', ['遮罩'] = 'text-bg-mask', ['阴影'] = 'text-bg-shadow', } -- 输出类名(含 .text-bg 前缀;去重、排序稳定) function p.class(frame) local raw = frame.args[1] or frame.args['效果'] or frame.args['effect'] or '' local seen = {} for part in raw:gmatch('[^%+]+') do local name = part:gsub('^%s+', ''):gsub('%s+$', '') local cls = classMap[name] if cls then seen[cls] = true end end local out = { 'text-bg' } for cls in pairs(seen) do table.insert(out, cls) end table.sort(out) return table.concat(out, ' ') end return p
此页面嵌入的页面:
Module:TextEffect/doc
(
查看源代码
)
返回
Module:TextEffect
。
查看“︁Module:TextEffect”︁的源代码
来自久远澪Wiki