1<! DOCTYPE html>234<title></title>5<style type="Text/css">6 #mask_box {7Width -%;8Height -%;9Z-index:9999;TenPositionfixed; OneTop0; ALeft0; - Display:none; - } the #DialogWrapper { - width:500px; - margin:50px Auto; - padding:10px; +text-Align:center; - background: #f1f1f1; +border-radius:20px; A } at #DialogYesBtn { -margin-left:10px; - color: #fff; - padding:5px 20px; - Cursor:pointer; - } in #DialogNoBtn { - padding:5px 10px; to Cursor:pointer; + } - #DialogWrapper img { theWidth -%; * } $@media screen and (max-width:768px) {Panax Notoginseng /*CSS for mobile*/ - } the</style> + A<body> the<div id="Mask_box"> +<div id="Dialogwrapper"> -<divclass="dialog_content"> $<H1 style="font-size:40px;border-bottom:1px solid #ddd;p adding-bottom:10px;">Viavelobike $<div> -<p>please Choose your country:</p> -</div> the<divclass="Dialog_text"> -"dialogyesbtn"Src="https://cdn.shopify.com/s/files/1/1811/7921/t/4/assets/canada.jpg"alt="Canada"/>Wuyi"dialognobtn"Src="https://cdn.shopify.com/s/files/1/1811/7921/t/4/assets/us.jpg"alt="US"/> the</div> -</div> Wu</div> -</div> About</body> $<script src="Jquery-1.12.4.min.js"></script> -<script> - $ (function () { -$("#mask_box"). Fadetoggle ( +); A + }); the $ (function () { -$("#DialogYesBtn"). Click (function () { $Window.location.href ='http://stackoverflow.com/';//Special for the programmer's question and answer site, seconds to kill a certain degree of domestic the }) the$("#DialogNoBtn"). Click (function () { the$("#mask_box"). Fadetoggle ( -); the }) - }); in</script> theCode parsing: First, only applicable to the need to pop-up window and center effect, but the above code does not apply to a translucent matte effect of the scene, if you want to achieve, with the help of JS, and then Add.
A simple popup centering effect on the mobile side