CSS样式的输入不工作

CSS style on Input not working

本文关键字:工作 输入 样式 CSS      更新时间:2023-09-26

我有这些代码和样式不工作。有什么线索吗?

HTML

<input class="button" type="button" onclick="bet_player()" value="Click to Start Betting"></input>
CSS

.button {
    border-style: solid;
    border-color: #000;
    width: 150px;
    height: 80px;
    background-color: red;
}

你的CSS是无效的:

#p1cash, #p2cash {
  font-size: 22px;
  font-weight: bold;
  color: #000000;
**)** --- here should be }

没有font-color属性只有color

似乎工作正常:https://jsfiddle.net/jhddfngt/1/

你能发布一个链接到现场版本吗?你很有可能在其他地方有冲突的CSS。

如果你不能共享链接,试着使用一个不常用的类:

HTML:

<input class="button-testing" type="button" onclick="bet_player()" value="Click to Start Betting">
CSS:

.button-testing {
    border-style: solid;
    border-color: #000;
    width: 150px;
    height: 80px;
    background-color: red;
}