html - 输入类型 = 'submit' 样式未出现在 IE 7 中

标签 html css internet-explorer styling

我试图在 html 上为我的按钮设置样式,但在 IE 7 中它不再改变,

这是我的CSS代码:

input[type=submit]{
background:url('../images/btn_login.png')repeat-x; 
color:white;
font-size:15px;
border-radius:5px;
}

这是我的 html 代码:

<input type='submit' value='Masuk'>

它会出现在其他浏览器上,如 firefox 或 chrome,但它在 IE 7 上不会改变 也许我需要为 IE 添加一些特定的 css 代码?

谢谢

最佳答案

你可以通过将它作为一个类来使用它 .btn { 背景:url('../images/btn_login.png')repeat-x; 白颜色; 字体大小:15px; 边界半径:5px;

然后把它叫做你的html代码

<input type='submit' value='Masuk' class='btn'>

关于html - 输入类型 = 'submit' 样式未出现在 IE 7 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23645324/

相关文章:

html - 在垂直布局中结合固定和流动

html - 在具有基于 px 边距的容器内使用基于 % 的宽度 div

html - 我怎样才能在每个表下面放一个 "+"?

html - 奇怪的重复 IE div

windows - 如何防止IE在访问本地网站时使用我的windows身份?

javascript - jQuery 预加载仅适用于刷新时的 ie

javascript - 如何使用 javascript 解析带有数组的外部 JSON 文件

html - 用Groovy存储图像

jquery - 检查所有空文本输入的验证不起作用

html - 具有影响元素背景重复透明度的内边框