Yootheme Pro的下拉单菜单设置6列布局
Yootheme Pro的下拉单菜单,默认可以设置最多5列的布局,如果我们的下拉菜单需要6列的布局,就需要进行修改
修改文件:
templates/yootheme/vendor/yootheme/theme/config/customizer.json
修改622行到634行代码
"columns": {
"label": "Columns",
"description": "Split the dropdown into columns.",
"type": "select",
"level": 0,
"default": 1,
"options": {
"1": 1,
"2": 2,
"3": 3,
"4": 4,
"5": 5
},
修改成这样:
"columns": {
"label": "Columns",
"description": "Split the dropdown into columns.",
"type": "select",
"level": 0,
"default": 1,
"options": {
"1": 1,
"2": 2,
"3": 3,
"4": 4,
"5": 5,
"6": 6
},
保存文件。
然后到YOOtheme Pro的设置-自定义代码,CSS代码那里添加
.uk-navbar-dropdown-width-6:not(.uk-navbar-dropdown-stack) {
width: (@navbar-dropdown-width * 6);
}
现在,你就可以选择6栏的下拉菜单。
但这是属于修改核心文件,升级后会有被覆盖的风险,请做好备份。