2012-03-20 67 views

回答

2

您需要在您的弹出代码在下面的例子中添加了data-overlay-theme属性,如:

<div data-role="popup" id="popupDialog" data-overlay-theme="b" data-theme="b" data-dismissible="false" style="max-width:400px;"> 
    <div data-role="header" data-theme="a"> 
     <h1>Delete Page?</h1> 
    </div> 
    <div role="main" class="ui-content"> 
     <h3 class="ui-title">Are you sure you want to delete this page?</h3> 
    <p>This action cannot be undone.</p> 
     <a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back">Cancel</a> 
     <a href="#" class="ui-btn ui-corner-all ui-shadow ui-btn-inline ui-btn-b" data-rel="back" data-transition="flow">Delete</a> 
    </div> 
</div> 

然后你可以通过添加类似你的CSS控制叠加把背景页面上的不透明度像这样:

.ui-popup-screen { 
    background-color: #000 !important; 
    opacity: 0.75 !important; 
}