css - Internet Explorer,突出显示文本时会更改字体和/或大小

标签 css internet-explorer internet-explorer-8 fonts

在我当前正在开发的网页上使用 IE 8 突出显示文本时,字体会发生变化和/或有时会发生大小变化。当我将鼠标悬停在菜单上时,有时会发生同样的事情。

这是我的 css 的样子,我不知道为什么会出现错误?另一件非常奇怪的事情是,我在我的 osx 上安装了带有 paralells 的 Windows 7,但错误并没有发生在那里,而是只发生在 PC 计算机上。我试过更改字体但没有帮助...

这是我的CSS:

body {
    font-family: verdana, sans-serif;
    font-size: 14px;
}

#wrapper, .wrapper {
    width: 900px;
    padding: 0 30px;
    margin-left: auto;
    margin-right: auto;
}

#header {
    background: url('http://localhost:8888/wp-content/uploads/2012/09/120920_scam_banner.jpg') no-repeat;
    height: 150px;
    margin: 20px 0;
}

#header div {
    width: 900px;
    height: 150px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    background: none;
}

#header div a {
    text-indent: -9999px;
    position: absolute;
    width: 900px;
    height: 150px;
}



#header div a:hover {
    background: none;
}

#section {

}

#menu {
    float: left;
    width: 175px;
    padding: 20px 25px 0 0;
    border-right: 2px solid #000;
    text-align: right;
}

#menu a, a {
    color: #000;
    text-decoration: none;
}

.mp-formdiv {
    float: right;
}

img {
    border: 1px solid #000;
}

#menu a:hover, a:hover {
    color: #fff;
    background: #000;
}

.menu li {
    margin: 3px 0;
    text-align: right;
}

#menu h3 {
    line-height: 52px;
}

#menu .artists {
    padding-left: 10px;
}

#menu-artists li {

}

#content {
    float: right; 
    width: 670px;
    padding: 20px 0 50px 20px;
}

#footer {
    overflow:hidden;
    clear: both;
}

#white_footer {
    float: left;
    width: 300px;
    background: #fff;
    height: 20px;
}

#footer_content {
    height: 20px;
}

.store {
    overflow-y: scroll;
}

#the_store {
    margin-top: 10px;
}

/* FONTS */




h1 {
    font-size: 3em;
    margin-bottom: 40px;
    white-space: nowrap;
    line-height: 0%;
}

h1.storefront {
    font-size: 2em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.5em;
}

#content p strong {
    font-weight: bold;
}

#content p img {
    float: left;
    margin: 5px 20px 20px 0;
}

#content p img:after {
    margin-top: 20px;
}

#subscribe_mail input[type=text]{
    width: 85px;
    height: 12px;
    font-size: 0.60em;
    margin-bottom: 5px;
    float: left;
    margin-right: 4px;
}

#subscribe_mail input[type=text]:focus {
    font-size: 0.75em;
}

#subscribe_mail input[type=submit] {
    border: 1px solid #999;
    font-size: 0.75em;
    float: left;
}

.mp-message, .mp-loading {
    font-size: 0.75em;
}

.MailPressFormName {
    display: none;
}

#artist_info {
    display: none;
    margin-top: 40px;
    overflow: hidden;
    clear: both;
}

.more-less {
    background: #000;
    float: left;
    color: #fff;
    padding: 0 2px;
    margin-top: 10px;
}

#artist_less {
    display: none;
}

.gallery-icon a:hover {
    background: none;
}

.gallery dl {
    margin-top: 0 !important;
    margin-bottom: 15px;
}

.gallery dl dd {
    font-size: 0.75em;
}

.newsletterH {
    margin-bottom: 5px;
}

最佳答案

我会使用 Firefox 的 Firebug 插件来查看样式的来源。 IE 提供了一个不太友好的开发人员工具窗口,它做类似的事情(我只在样式问题只发生在 IE 中时才使用它)。我会先检查您的 :hover 和 :focus 规则,因为这些规则会导致在悬停或选择时发生事情。

关于css - Internet Explorer,突出显示文本时会更改字体和/或大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12551083/

相关文章:

internet-explorer - 为什么单击 excel 中的超链接会在用户代理中使用 MSIE 7.0 生成 HTTP 请求?

javascript - Internet Explorer 8 原型(prototype)和 XMLHttpRequest

html - <th> 中 <p> 内的水平居中垂直文本

css - 如何制作 Less CSS 输出 css,然后上传到网络服务器

windows - Windows 7 上的 Internet Explorer 11 之后是什么? ES2016 在企业中的支持情况如何?

css - 从 http 切换到 https 会导致 CSS 问题

javascript - 为什么我的上下文菜单会在页面顶部添加空白区域?

javascript - div上的jquery点击事件

internet-explorer - Backbone.js 在 IE6 IE7 和 IE8 上的性能

jQuery 无法在 ie7/8 上运行