【发布时间】:2018-10-03 23:22:56
【问题描述】:
我能够为其创建代码,但该复选框未出现在图像上方。有点偏了,怎么修?
.custom-checkbox input {
display: none;
}
.custom-checkbox span {
border: 2px solid #7e8a94;
float: right;
height: 20px;
width: 20px;
border-radius: 5px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
}
.custom-checkbox:hover span,
.custom-checkbox input:checked + span {
border: 3px solid #43D8B0;
}
.custom-checkbox input:checked + span:before {
content: "✔";
}
<label class="custom-checkbox">
<img class="img" src="http://i63.tinypic.com/2rrqs1l.png"/>
<input type="checkbox">
<span></span>
</label>
我希望复选框出现在左上角, 这样:http://prntscr.com/j960yk
感谢您的宝贵时间。
【问题讨论】:
-
你建议我在哪里上传?
-
问题标题没有描述您在问题详细信息中要求的内容
-
抱歉让我修复它,因为我可以看到图像。
-
不,这不是上一个问题的重复,我在发布这个问题之前已经提到过。
标签: javascript html css