私はnoneに境界線を設定するとIE8入力タイプの画像は、さえ国境を示しています
-
23-09-2019 - |
質問
私は私のカスタムスタイルのボタンを表示するには、入力タイプの画像を使用していますが、何らかの理由で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は、デフォルトのアウトラインが指定されている場合があります。もっと読むそれについては、 W3Schoolsののでます。
この質問を尋ねるために、すべての感謝の最初の
。私は、一年前にこのPROBに直面してきたあなたが必要な方法を選択することができますが、私がやったが、単に私のstyle.cssで出発点として、この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をインポートする習慣をしておこう場合は、それはあなたにどのブラウザでも望ましくない出力を提供することはありません。
ありがとうございます。
所属していません StackOverflow