gpt4 book ai didi

html - 我无法从 CSS 页面更改按钮的大小

转载 作者:太空宇宙 更新时间:2023-11-04 15:45:54 24 4
gpt4 key购买 nike

我想更改网页上输入提交按钮的大小。我使用了此页面上介绍的方法 How to edit the size of the submit button on a form?

但是除了我直接在输入行的html代码中更改按钮大小的方法外,我无法编辑按钮的大小。这是我当前的代码:

网页:

p,h1,h2,label
{
text-align: center;
}
body
{
background-color: white;

}
#vote
{
border: none;
width: 100px; height: 50px;
}
<header> 
<h1> Site de vote </h1>
<h2> Télécommande de vote </h2>
</header>
<input type="submit" value="test" id="vote" class="vote" />

<form action="page_validation.php" method="post">
<p>
<input type="submit" name="reponse1" value="A" id="vote" class="vote"/>
<input type="submit" name="reponse2" value="B" id="vote" class="vote" />
</p>
<p>
<input type="submit" name="reponse3" value="C" id="vote" class="vote"/>
<input type="submit" name="reponse4" value="D" id="vote" class="vote"/>
</p>
<p>
<input type="submit" name="reponse5" value="E" id="vote" class="vote" />
</p>
<input type="hidden" name="numero_question" value="" />
<input type="hidden" name="user_name" id="theid" value="" />
<input type="hidden" name="eval_number" id="myid" value="" />
</form>

我尝试使用 id (#vote) 类 (input.vote) 并且我只尝试了 input[type=submit] 但这些都不起作用。在 css 页面中应用的所有其他更改(p、h1、...)都可以正常工作。

最佳答案

问题是你已经为许多元素使用了 id="vote",你必须在页面中只使用每个 id 一次,为每个元素使用特定的 id,如果你想为 manu 元素设置样式此刻,您可以使用可用于许多元素的类

关于html - 我无法从 CSS 页面更改按钮的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55808108/

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