<!DOCTYPE HTML><HTMLLang= "zh"><Head><MetaCharSet= "Utf-8" /><title>The radio button implements the window to close the layout</title><Metaname= "Author"content="" /><style>*{margin:0;padding:0;}ul Li{List-style:None;}. First{position:relative;background:#0f0;width:500px;}. Chk_1{Display:None; }. Chk_1 + Label{width:30px;Height:30px;text-align:Center;Line-height:30px;Background-color:#FFF;background:Rgba (255, 0, 107, 0.83);padding:5px;Display:Inline-block;position:Absolute; Right:0;Top:0;Z-index:2;}. chk_1:checked + Label{Display:None;}. chk_1:checked + label:after{Display:None;}. Second{position:Absolute;Z-index:1;width:500px;Height:300px;background:#FF00DF;}. chk_1:checked ~ Div{Display:None;}</style></Head><Body><Div> <ul> <Liclass= ' first '> <inputtype= "checkbox"ID= "CHECKBOX_A1"class= "Chk_1" /> <label for= "CHECKBOX_A1">X</label> <Divclass= ' second '></Div> </Li> </ul></Div></form></Body></HTML>
Pure CSS plus pseudo class implementation close prompt Create window