我一直在尝试将语言选择器从页脚移动到页眉。我已经快到了,但它仍然不起作用。 我尝试在 theme.liquid 上使用 js 片段,这使得按钮显示,但该功能不起作用。谁能帮我解决这个问题吗? 预先感谢!
我使用了这段代码并将其插入标签内。
设置超时(()=> { 让 elementToInsertBefore = document.querySelector(".mobile-icons .header__link.action-area__link") let newElement = document.querySelector(".localization.footer-menu__disclosure.is-hidden-medium.is-hidden-mobile-only .selectors-form__item.selectors-form__locale .disclosure.disclosure--i18n.disclosure-text-style-大写”); elementToInsertBefore.parentNode.insertBefore(newElement, elementToInsertBefore); }, 1000)按钮在那里,但不起作用..我错过了什么吗?
只需应用这个简单的CSS即可使选择器位于页面的左上角
.disclosure--i18n {
position: absolute;
display: block;
top: 96px;
left: 113px;
}
.disclosure__list-wrap {
transform: translate(18px, 142px);
}