【问题标题】:DIfference between IE and FF. ColorsIE和FF的区别。颜色
【发布时间】:2012-05-06 19:39:13
【问题描述】:

我在下面的 CSS 代码中发现了 IE7 和 FF 的区别:

.list-common-wrapper .button-unfixed .button-unfixed-normal[disabled] .button-background, #id-chart-editor-active-event .button-unfixed .button-unfixed-normal[disabled] .button-背景,.three-lists .button-unfixed .button-unfixed-normal[disabled] .button-background { 背景: url("../images/button/btn_var_bg.gif") 不重复向左滚动 -120px 透明; 颜色:#777777; 光标:默认; 文字装饰:无; } list.css(第 122 行) .list-common-wrapper .button-unfixed .button-unfixed-normal .button-background, #id-chart-editor-active-event .button-unfixed .button-unfixed-normal .button-background, #id-profile -editor-move-attributes-buttons .button-unfixed .button-unfixed-normal .button-background { 颜色:#333333; 光标:指针; } list.css(第 132 行) .button-unfixed-normal .button-background { 背景: url("../images/button/btn_var_bg.gif") 无重复向左滚动 0 透明; 显示:块; 填充:2px 8px 4px 12px; } button.css(第 111 行) 继承自a.button-unfixed-def # .list-common-wrapper .button-unfixed .button-unfixed-normal[disabled], #id-chart-editor-active-event .button-unfixed .button-unfixed-normal[disabled], #id-profile-editor -move-attributes-buttons .button-unfixed .button-unfixed-normal[disabled] { 颜色:#777777; 光标:默认; 文字装饰:无; } list.css(第 142 行) .list-common-wrapper .button-unfixed .button-unfixed-def { 字体大小:12px; 行高:130%; } list.css(第 163 行) .button-unfixed .button-unfixed-正常 { 颜色:#333333; 文字装饰:无; } button.css(第 104 行) .button-unfixed .button-unfixed-def { 光标:默认; 字体大小:12px; 行高:130%; } button.css(第 93 行) 一种 { 颜色:#175DB5; 文字装饰:下划线; }

表示颜色#777777在IE7和FF中显示不一样(看箭头):

【问题讨论】:

  • 您是在 Mac/PC 上查看此内容吗?
  • 我的环境:Windows 7 Internet Explorer 7

标签: css internet-explorer firefox


【解决方案1】:

由于附加了背景图片,您可能会看到差异。

如果是 IE7 - 它根本不支持背景的简写属性。 http://www.w3schools.com/cssref/css3_pr_background.asp

这需要改变

background: url("../images/button/btn_var_bg.gif") no-repeat scroll left -120px transparent;

到:

background-image: url('../images/button/btn_var_bg.gif');
background-repeat: no-repeat;
...and so on....

【讨论】:

  • “禁用”属性会影响 IE7 按钮的样式吗?在我看来,这就是问题所在
  • 这与主题无关。您需要接受此答案(如果它解决了您的问题)并开始一个新主题。是的,'disabled' 属性会改变你的样式。
  • 如果您不提供 HTML 代码(或更好的 URL),我们将无法为您提供帮助。我们只能想象。
  • 对不起,伙计。刚刚找到了解决办法。看来IE7对属性disabled有自己的样式,所以问题就解决了。反正你的回答很好
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-09-20
  • 2017-03-12
  • 2023-03-20
  • 2020-06-20
  • 1970-01-01
  • 2018-03-11
相关资源
最近更新 更多