Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/71.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 按钮内的文本闪烁_Html_Css - Fatal编程技术网

Html 按钮内的文本闪烁

Html 按钮内的文本闪烁,html,css,Html,Css,这只是IE中的问题。请仅在IE中打开小提琴 html: 单击按钮时,按钮的内容将更改其对齐方式 这可以解决吗?这是因为IE读取了我们在元素中应用的填充边距和其他度量,这与Chrome和Firefox不同 您可以做的是检测用户当时使用的浏览器 让css与之兼容 您可以使用下面的代码 <!--[if IE]> <style type="text/css"> IE specific CSS rules go here </style> <![endif]

这只是IE中的问题。请仅在IE中打开小提琴

html:

单击按钮时,按钮的内容将更改其对齐方式


这可以解决吗?

这是因为IE读取了我们在元素中应用的填充边距和其他度量,这与Chrome和Firefox不同

您可以做的是检测用户当时使用的浏览器

让css与之兼容

您可以使用下面的代码

<!--[if IE]>
<style type="text/css">
  IE specific CSS rules go here
</style>
<![endif]-->


希望这能帮助IE理解内联块的属性

如果需要将
图标
设置为
内联块
,可以使用以下技巧:

.icon {
    background:
    url(https://cdn2.iconfinder.com/data/icons/deadsimple/youtube.gif) no-repeat right center;
    height: 10px;
    width: 18px;
    display: inline-block;
    *display: inline;
    margin: 5px 0px 0px 5px;
}

星号
*
属性允许其他浏览器忽略该属性。IE将用最后一个属性(
inline
)覆盖第一个属性(
inline
)。

换行键的内容-添加
位置:相对;排名:0;左:0

.Main\u按钮{
背景色:#7474;
}
.查找按钮{
显示:内联块;
填充:7px 10px;
垫面:4px;
颜色:白色;
浮动:左;
线高:25px;
字体大小:13px;
字体大小:粗体;
右边填充:10px;
边框:实心0px;
高度:33像素;
}
.图标{
背景:url(https://cdn2.iconfinder.com/data/icons/deadsimple/youtube.gif)右中无重复;
高度:10px;
显示:内联块;
宽度:18px;
保证金:5px 0px 0px 5px;
}
span{
位置:相对;顶部:0;左侧:0;
}
查找
嗯,按钮不会“闪烁”。按钮正在“向下”-看起来“按下”,就像在Windows 95/XP中一样。可能是重复的
<!--[if IE]>
<style type="text/css">
  IE specific CSS rules go here
</style>
<![endif]-->
.icon {
    background:
    url(https://cdn2.iconfinder.com/data/icons/deadsimple/youtube.gif) no-repeat right center;
    height: 10px;
    width: 18px;
    display: inline-block;
    *display: inline;
    margin: 5px 0px 0px 5px;
}