Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 我的CSS中不必要的变量需要影响外观-什么';错误的_Html_Css_Internet Explorer 8 - Fatal编程技术网

Html 我的CSS中不必要的变量需要影响外观-什么';错误的

Html 我的CSS中不必要的变量需要影响外观-什么';错误的,html,css,internet-explorer-8,Html,Css,Internet Explorer 8,我正在尝试在IE8()中绘制此按钮 我从另一个来源获取CSS,只留下我认为需要的内容 我最后说了这句话: .ie8.aaa.button1{右边填充:4px;宽度:94px} aaa来自前一个源代码,因此未在我的HTML中使用,即: <!--[if IE 8 ]> <html class="ie8"> <![endif]--> . . . <form action="a.htm" method="POST" target="_blank"> <

我正在尝试在IE8()中绘制此按钮

我从另一个来源获取CSS,只留下我认为需要的内容

我最后说了这句话:

.ie8.aaa.button1{右边填充:4px;宽度:94px}

aaa
来自前一个源代码,因此未在我的HTML中使用,即:

<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
.
.
.
<form action="a.htm" method="POST" target="_blank">
<div class="button-holder"><input type="submit" class="button1" value="Hello">
<span class="arrow"></span>
</div>
</form>

根据我对.ie8类的理解(我在代码中也使用了这个),您应该在代码中的某个地方有一个条件注释,以便实际将该类应用于html、body或某种父元素。然后,您可以使用专门适用于ie8的CSS样式来定位元素。例如,这是我在索引页上的代码中的内容:

<!--[if IE 8]> <html class="ie8"> <![endif]-->


这就是我学习它的地方:

是的,我将它包含在
标题中(编辑我的问题以显示它)。很抱歉,上次发布后脱机了。在回顾了你的风格之后,我想说你的
text align:center
on.button1在你的ie8上被继承了。如果你不在HTML中使用“aaa”类,那么你可能根本不需要CSS行
<!--[if IE 8]> <html class="ie8"> <![endif]-->