.black_overlay {
display: none;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: 0.8;
opacity: .80;
filter: alpha(opacity=80);
}
.white_content {
display: none;
position: absolute;
top: 30%;
left: 10%;
width: 80%;
height: 180px;
background-color: white;
z-index: 1002;
overflow: auto;
border: 1px solid #D7D7D7;
border-radius: 10px;
overflow: hidden;
}
<div id="fade" class="black_overlay">
</div>
<div id="MyDiv" class="white_content">
<div style="height: 40px;text-align: center; line-height: 40px;" id="move">
<span style="font-size: 16px;color: #4F4F4F;position: relative;left: 20px;">分享文案已复制</span>
<span class="mui-pull-right" style="font-size: 32px;color: #D7D7D7;float: right;margin-right: 12px;position: relative;top:-5px" onclick="CloseDiv('MyDiv','fade')">×</span>
<textarea class="share_wenan2">安静的建安费第三方接口的撒娇</textarea>
</div>
<div style="text-align:center;margin-top: 100px;padding-top: 10px;border-top:1px solid #D7D7D7">
<p style="font-size: 12px;text-align:center;padding: 0px;color: #0278ff;">去微信粘贴</p>
</div>
</div>
function ShowDiv(show_div, bg_div) {
document.getElementById(show_div).style.display = 'block';
document.getElementById(bg_div).style.display = 'block';
var bgdiv = document.getElementById(bg_div);
bgdiv.style.width = document.body.scrollWidth;
};
function CloseDiv(show_div, bg_div) {
document.getElementById(show_div).style.display = 'none';
document.getElementById(bg_div).style.display = 'none';
};