工作小总结

【实用】div选中添加√,并将选中的图片在其他地方显示

在工作中我们有可能会遇到:这里开个就做个简单的demo:直接上代码:<!DOCTYPE html><html><head><meta charset="UTF-8"><title>点击div左上角出现对勾选中效果</title><style type="text

在工作中我们有可能会遇到:

c555243c720cd5a31c2fadd65bce888a.png

这里开个就做个简单的demo:

直接上代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>点击div左上角出现对勾选中效果</title>
<style type="text/css">
#box {
	margin: 20px auto;
	height: 100px;
	width: 150px;
	position: relative;
	cursor: pointer;
	overflow: hidden;
	background-color: #ccc;
}

#box.border {
	border: 1px dotted red;
}

#box .gou {
	position: absolute;
	width: 24px;
	height: 24px;
	right: 0px
}

#box .gou.on::after {
	border-color: red;
}

#box .gou::after {

原创不易,完成人机校验,阅读全文

相关推荐