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库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库