我有一个按钮,我想让它变得非常大:
<button type="submit" class="button">Compra</button>
我正确(我已经有反馈)链接了一个包含此类的 CSS 文件:
.title
{
font-size:75px;
text-align:center;
color:blue;
font-family:"Times New Roman",Georgia,Serif;
}
.subtitle
{
font-size:50px;
font-family:"Times New Roman",Georgia,Serif;
}
.text
{
font-size:25px;
font-family:"Times New Roman",Georgia,Serif;
}
.table
{
font-size:25px;
font-family:"Times New Roman",Georgia,Serif;
border: 0px;
text-align: left;
border-spacing: 20px 10px;
}
.button
{
width:280px;
height:280px;
}
但是按钮不受按钮类大小的影响。如果我这样做:
<body>
<form action="Purchase.xhtml" method="post">
<button type="submit" class="button">Compra</button>
... (other code)
它可以工作,但我需要使用 CSS 文件,因为我有很多按钮,而且我可能想全部更改,所以在这种情况下,我只需更改 CSS 文件。
有人知道为什么按钮类的宽度/高度属性不会影响按钮大小吗?
小提琴:
编辑
它适用于Firefox,但不适用于chrome。