簡體   English   中英

在Internet Explorer 8中創建HTML模式窗口

[英]Creating HTML modal window in Internet Explorer 8

如何在Internet Explorer 8中創建模態窗口,使整個屏幕變灰並顯示ajax微調器?

<div style="display: none; position: fixed; z-index: 1000; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0, 0.4)">

跟隨div可以很好地處理Edge,但是不會使IE8中的屏幕變灰,而是讓用戶與頁面進行交互。

如何使它在IE中工作?

rgba和background-color似乎在IE 8中不起作用 caniuse_rgba caniuse_background-color

您可以使用背景進行后備

background: #EEE /* The Fallback */
background: rgba(0,0,0, 0.4)

IE 8不像更新的瀏覽器那樣支持不透明度,但是您可以使用舊的Microsoft過濾器屬性來實現。

看看這是否適合您:

background-color: rgba(0,0,0);
opacity: 0.4; /* Newer browsers */
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=40); /* IE8 */

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM