这适用于除 IE10 之外的所有浏览器。
在隐藏的 div 上使用简单的 jQuery 切换功能时,它会导致底角留下锯齿状的“涂抹”。我以前从未见过这种情况。我想这与border-radius css有关,但我在Firefox或Chrome中对此没有任何问题。有什么想法吗?这是一个 IE 10 错误还是我在做一些愚蠢的事情?
HTML:
<div id="app_cont">
<div id="game_pnl">
<div id="hid_div"></div>
<div id="btn_cont" unselectable="on">
<a href="#" id="def_btn" class="app_btns" unselectable="on">Submit</a>
</div>
</div><!--#game_pnl-->
</div><!--#app_cont -->
CSS:
#app_cont {
border: 1px solid grey;
height: auto;
width: 500px;
margin: 100px auto 100px auto;
background: #efefef;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
font-family: Arial;
font-size: 1.6em;
padding: 10px;
}
#btn_cont {
border: 1px solid grey;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
background: #dcdcdc;
clear: both;
padding: 10px;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.app_btns {
margin: 0px 0px 0px 0px;
min-width: 90px;
text-align: center;
font-size: 16px;
font-family: Arial;
font-weight: normal;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
border: 1px solid #ababab;
padding: 9px 18px;
text-decoration: none;
background: -webkit-gradient(linear, left top, left bottom, color-stop(5%, #ededed),
color-stop(100%, #dfdfdf) );
background: -moz-linear-gradient(center top, #ededed 5%, #dfdfdf 100%);
background: -ms-linear-gradient(top, #ededed 5%, #dfdfdf 100%);
filter: progid : DXImageTransform.Microsoft.gradient (
startColorstr = '#ededed', endColorstr = '#dfdfdf' );
background-color: #ededed;
color: #777777;
display: inline-block;
text-decoration: none;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.app_btns:hover {
background: -webkit-gradient(linear, left top, left bottom, color-stop(5%, #dfdfdf),
color-stop(100%, #ededed) );
background: -moz-linear-gradient(center top, #dfdfdf 5%, #ededed 100%);
background: -ms-linear-gradient(top, #dfdfdf 5%, #ededed 100%);
filter: progid : DXImageTransform.Microsoft.gradient (
startColorstr = '#dfdfdf', endColorstr = '#ededed' );
background-color: #dfdfdf;
cursor: pointer;
}
.app_btns:active {
position: relative;
top: 1px;
}
#hid_div {
border: 1px solid grey;
background: #f1e8ba;
width: 482px;
height: auto;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
margin: 0px 0px 10px 0px;
float: left;
display: none;
padding: 8px;
line-height: 20px;
font-size: 14px;
color: #313131;
}
jQuery:
$('#def_btn').on('click', function(){
$('#hid_div').slideToggle(250);
});