gpt4 book ai didi

html - 如何在多个 div 中选择属性

转载 作者:太空宇宙 更新时间:2023-11-03 21:48:21 24 4
gpt4 key购买 nike

我有这个:

<div id="sidebar-a">
<form id="form">
<input class="button" type="submit">
</input>
</form>
</div>

我只需要选择 input(我的页面在 <form> 中有相同的 #footer ,更改此属性的唯一方法是,例如我尝试使用 #sidebar-a 来做,但它不起作用)

最佳答案

鉴于您没有提及 JQuery,我假设您正在尝试通过 CSS 选择输入元素。

#sidebar-a > form > input.button:first-child {
font-size: 2em;
}

一个例子是 available at this JSFiddle

关于html - 如何在多个 div 中选择属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19161764/

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