【发布时间】:2013-04-14 01:35:05
【问题描述】:
这是我在代码中的按钮:
<!-- CSS Code -->
input {
height: 100px;
width: 150px;
font-size: 55px;
text-align: center;
}
button {
width: 87px;
height: 38px;
font-size: 12px;
}
<!-- HTML Code -->
<input type="submit" class="button" value="Student">
当我在 macbook 和我的 windows 笔记本电脑上查看这个按钮时,它们看起来都不同。
Mac 操作系统:
Windows 7:
如您所见,Windows 7 版本中的按钮更大,字体更大。我最初是在我的 Macbook 上开发的。我需要更改代码中的某些内容吗?为什么要这样做?
【问题讨论】:
-
您是否使用了 CSS 重置?
-
OS X 是否允许您设置按钮样式?此外,您的按钮是
input元素,而不是button,因此它的字体大小为55px。 -
button != 输入类按钮。
-
@Blender:
input. button选择器将input元素与class="button"匹配,而不是button元素。 -
@Guffa:最初的问题将
button作为第二个选择器。
标签: html css windows macos button