微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

任何人都知道为什么这样:在CSS不能在IE9中工作?

This submit button应在左侧倒圆,并指向右侧.它在非ie浏览器中工作,但在IE9中,它不起作用.

如果我查看开发人员工具中的样式,.flat-button:在规则之后将所有内容划掉,就像它被某些东西取代一样.什么?

<button type="submit" class="flat-button">Submit</button>
<style>
.flat-button {
    float: left;
    position: relative;
    border-top-left-radius: 5px;
    -moz-border-top-left-radius: 5px;
    -webkit-border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    -moz-border-bottom-left-radius: 5px;
    -webkit-border-bottom-left-radius: 5px;
    border: none;
    padding: 0 12px;
    margin: 0 3px 3px 0;
    outline: none;
    cursor: pointer;
    color: white;
    font-family:'Trebuchet MS',Arial,helvetica,Sans-Serif;
    font-size: 14px;
    font-weight: bold;
    font-style: italic;
    text-decoration: none;
    border-collapse: separate;
    height: 26px;
    line-height: 26px;
    background: #5191cd;
}
.flat-button:hover {
    background: #1c3f95;
}
.flat-button:after {
    position: absolute;
    content: ' ';
    height: 0;
    width: 0;
    left: 100%;
    border: 13px solid transparent;
    border-left-color: #5191cd;
}
.flat-button:hover:after {
    border-left-color: #1c3f95;
}
</style>

解决方法

玩了一会儿后,我找到了IE9的简单修复程序.

http://jsfiddle.net/thirtydot/BWC9q/10/

所有你需要的是添加溢出:可见.flat按钮.

原文地址:https://www.jb51.cc/css/215313.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。