IE9中带方角的Bootstrap按钮

时间:2013-09-03 11:51:17

标签: css twitter-bootstrap twitter-bootstrap-3

我真的把头发撕成了这个。我正在尝试使用一些文本,两个单选按钮和一个提交按钮创建一个相当简单的页面。到目前为止它在Firefox和Chrome中看起来很好,但在IE9中,提交按钮有方角:

IE9 submit button issue

当我查看Bootstrap网站上的示例页面时,按钮的角落都是正确的四舍五入,所以它必须是我正在做的事情而不是IE的问题。我只是无法弄清楚是什么。

<div class="container">
<div class="jumbotron">
    <div class="container">
        <h1>The welcome page.</h1>
        <p>Welcome to our page. Please select one of the options below and press 'Submit'.</p>
        <form>
          <div class="form-inline">
            <div class="radio">
                <input checked="" id="1-1" name="1" value="opt1" type="radio">
                    <label for="opt1">Option 1</label>
                <input id="1-2" name="1" value="opt2" type="radio">
                    <label for="opt2">Option 2</label>
            </div>
            </div>
          <input class="btn btn-lg btn-primary" value="Submit" type="submit">
        </form>
    </div>
</div>

以下是演示:http://bootply.com/78669

更新:这可能有助于缩小范围。当我从IE9中的新位置加载页面时,提交按钮看起来应该如此:

Button rendering properly

...但我得到'IE限制此页面运行脚本或ActiveX控件'消息。如果我点击以允许被阻止的内容,那就是当按钮角落变平方时。

4 个答案:

答案 0 :(得分:2)

Internet Explorer(版本9下)本身不支持圆角。

有一个神奇的脚本可以为你神奇地添加它:CSS3 PIE。你会弄明白其余的。

答案 1 :(得分:2)

问题将出现在IE 9设置中,我目前正在运行IE 9并且四舍五入。确保检查您的开发人员选项(F12)并查看您是否正在运行

BROWSER MODE: IE 9 and DOCUMENT MODE: IE9 STANDARDS

Find a screenshot showing these options at the top right here.

答案 2 :(得分:1)

Internet Explorer(版本9下)本身不支持圆角。

有一个神奇的剧本可以为你神奇地添加它:http://css3pie.com。希望你能弄明白其余部分。

答案 3 :(得分:1)

根据评论员Ryan McDonough的建议,我查看了文件并尽可能多地删除了css,然后发现了问题。这是:

<link href="css/bootstrap-theme.min.css" rel="stylesheet" type="text/css">

删除bootstrap-theme链接,一切正常。

相关问题