jQuery slideToggle and CSS border-radius property show unusually in IE10

馋奶兔 提交于 2020-01-05 06:56:11

问题


I am using MVC4 and in my page I took 4 div and all div. I have JSFiddle URL to check my exactly problem.

jsfiddle

Please run this in only in IE10, because in below IE10 or any other browser it working fine.

jQuery(document).ready(function () {
        jQuery(".HomeContent").hide();
        jQuery(".HomeDivHeading").click(function () {
            jQuery(this).next(".HomeContent").slideToggle(250);
        });
    });

In IE10 when I slide down any din it shows like this

I want to resolve this problem when I slide down div it look like wired and after some time it shows automatically corrected.


回答1:


It's a strange browser behavior. I've found out the solution as given belove;

.HomeDivHeading {
    background-color: #BBC0C4;
    border-radius: 10px 10px 0 0;
    display: inline-block; /* changed from block to inline-block*/
    font-size: 18px;
    font-weight: bold;
    padding: 6px 0;
    text-align: center;
    width: 100%;
    cursor: pointer;
}


来源:https://stackoverflow.com/questions/15430675/jquery-slidetoggle-and-css-border-radius-property-show-unusually-in-ie10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!