快速写代码如下:
$(文档对象).ready(function () {
$('.box-center').css('display','none');
$('.weixin-show').css('margin','0 auto');
var oDivH = $(document).height();
$('.weixin').click(function () {
$('.box-center').css({
'width':'100%',
'z-index':99,
'top':0,
'left':0,
'height':oDivH,
'position':'fixed',
'background':'rgba(0,0,0,0.4)',
'align-items':'center',
'display':'flex'
});
});
$('.box-center').click(function () {
$('.box-center').hide();
});
var weixin = document.getElementsByClassName('weixin-show')[0];
weixin.onclick = function (evt) {
evt = evt || window.event;
//js阻止事件冒泡
if (evt.stopPropagation) { //W3C
evt.stopPropagation();
} else { //IE
evt.cancelBubble = true;
}
}
});

文章已具雏形,需进一步聚焦核心问题。
每一个段落都紧密相连,逻辑清晰,展现了作者高超的写作技巧。