1
我想中心我的模態,我有以下代碼http://jsfiddle.net/be34jkzk/4/在IE8中工作的居中模態
這就是我的代碼。我只是想確保模態集中並且有點敏感。我嘗試將modalPopupClass的代碼更改爲這樣的東西,但它在IE8上顯示它很奇怪。
CSS:
.modalPopupClass{
display:none;
position: fixed;
top: 50%;
left: 50%;
width: 50%;
max-width: 630px;
min-width: 320px;
height: auto;
z-index: 4020;
transform: translateX(-50%) translateY(-50%);
}
'transform'不會在IE8工作... AFAIK。 – 2014-09-24 16:22:30
PS:我添加了JavaScript作爲內聯腳本,至少沒有更多的控制檯錯誤:http://jsfiddle.net/be34jkzk/2/ – ne1410s 2014-09-24 16:23:17
[在caniuse.com上IE8變換的大紅色塊](http ://caniuse.com/#search=transform) – misterManSam 2014-09-24 16:23:32