gpt4 book ai didi

css - YUI Squarespace CSS 操作

转载 作者:太空宇宙 更新时间:2023-11-03 17:54:25 25 4
gpt4 key购买 nike

我对 Squarespace 和使用 YUI(Yahoo!用户界面库)比较陌生,我需要一些帮助才能定位和更改 "input[type=radio]:checked"关于 CSS 样式 .menuradio {text-decoration:none !important;底部边框:4px solid #000;}

也就是说,我无法仅使用 CSS 定位这段代码:

<div class="sqs-block menu-block sqs-block-menu" data-block-type="18" id="block-yui_3_17_2_1_1412637006352_21955">
<div class="sqs-block-content" id="yui_3_17_2_1_1414597475438_1924">
<div class="menu-wrapper menu-style-classic" id="yui_3_17_2_1_1414597475438_1923">
<input type="radio" name="menu-selector-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" id="menu-select-all-day-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-button">
<input type="radio" name="menu-selector-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" id="menu-select-brunch-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-button menuradio">
<input type="radio" name="menu-selector-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" id="menu-select-dessert-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-button">
<input type="radio" name="menu-selector-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" id="menu-select-wine-list-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-button">
<input type="radio" name="menu-selector-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" id="menu-select-gluten-free-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-button">
<div class="menu-selector" id="yui_3_17_2_1_1414597475438_1922">
<label id="navbuttontop" for="menu-select-all-day-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-labels menu-label-all-day-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3 menuradio">ALL-DAY</label>
<label id="navbuttontop" for="menu-select-brunch-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-labels menu-label-brunch-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3 menuradio">BRUNCH</label>
<label id="navbuttontop" for="menu-select-dessert-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-labels menu-label-dessert-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3 menuradio">DESSERT</label>
<label id="navbuttontop" for="menu-select-wine-list-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-labels menu-label-wine-list-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3 menuradio">WINE LIST</label>
<label id="navbuttontop" for="menu-select-gluten-free-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3" class="menu-select-labels menu-label-gluten-free-yui_3_17_2_1_1412637006352_21955-28f6eb3b-5f85-4155-a233-f0c262fef2a3 menuradio">GLUTEN-FREE</label>
</div>

...

在输入之前我应该​​定位哪个类?

我使用这个脚本是否走在正确的轨道上?

Y.all('input:checked').addClass('menuradio');

Y.all('label').addClass('menuradio');

Y.one('#block-yui_3_17_2_1_1412637006352_21955 input[type=radio]:checked').addClass('menuradio');

Y.all('.menu-wrapper .menu-style-classic input[type=radio]:checked').addClass('menuradio');

?

似乎没有任何效果......

提前感谢您的任何输入;)

最佳答案

您几乎明白了(现在可能已经明白了)。这应该有效:

Y.all('input[type=radio]:checked').addClass('menuradio');

切记YUI is dying由于 Squarespace 将来可能会更改它,尽管 it may take a while .但是,我的意思是,我看不出有任何理由不使用 jQuery 而不是旧的 YUI! ;P

关于css - YUI Squarespace CSS 操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26635681/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com