div::after {
content: "X"
width: 10px
height: 10px
position: absolute
top: 50%
left: 50%
transform: translate(-50%, -50%)
}
栗如窗口最外层class名为 closed 则这么写 $(document).ready(function(){ $('.closed').click(function(){$(this).hide()})})记得头部引入 jQuery库<strong>叉叉</strong><span style="font-weight:boldfont-size:30px">叉叉</span>都可以!希望采纳