我使用的输入型图像显示我的自定义样式的按钮,但由于某些原因IE8节目边境,甚至当我在CSS边框设置为无。在其他浏览器它没有显示边界在所有的

input[type=image] {
    margin: 0px; 
    padding: 0px;
    border: none;
    border-width: 0px;
    border-style: none;
    background-color: none;
}
有帮助吗?

解决方案

IE不支持选择非常一致地在我的经验;给输入一个类,然后风格其与代替。

<input type="image" class="imageinput" name="whatever" />

input.imageinput {
    margin: 0px; 
    padding: 0px;
    border: none;
    background-color: none;
}

其他提示

使用outline CSS属性:

input[type="image"] {
    border: none;
    outline: none;
}

outline周围绘制的元件的裕度的线,而不有助于元件的宽度,和在这种情况下IE8可能具有指定的默认轮廓。了解更多关于它在W3School 的。

首先得益于用于询问这个问题。我面临过这样的概率在一年前,你可以选择的方式,你需要什么,但我所做的仅仅是进口该CSS在我的style.css的出发点和因为其不提供我不希望输出

/* Reset CSS */

body, html {
    height:100%;
}
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
    border:0;
    outline:0;
    font-size:100%;
    vertical-align:baseline;
    background:transparent;
    margin:0;
    padding:0;
}
body {
    line-height:1;
}
ol, ul {
    list-style:none;
}
blockquote, q {
    quotes:none;
}
blockquote:before, blockquote:after, q:before, q:after {
    content:none;
}
:focus {
    outline:0;
}
del {
    text-decoration:line-through;
}
table {
    border-collapse:collapse;
    border-spacing:0;
}

/* Floating & Alignment  */

.fl {
    float:left;
}
.fr {
    float:right;
}
.ac {
    text-align:center;
}
.ar {
    text-align:right;
}

/* Clear Floats  */

.col-full:after {
    content:".";
    display:block;
    height:0;
    clear:both;
    visibility:hidden;
}
.fix {
    clear:both;
    height:1px;
    overflow:hidden;
    margin:-1px 0 0;
}
html body * span.clear, html body * div.clear, html body * li.clear, html body * dd.clear {
    background:none;
    border:0;
    clear:both;
    display:block;
    float:none;
    font-size:0;
    list-style:none;
    overflow:hidden;
    visibility:hidden;
    width:0;
    height:0;
    margin:0;
    padding:0;
}

如果你继续导入此CSS它永远不会提供你在任何浏览器中的非期望产出的习惯。

谢谢!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top