Php 图片中的多个复选框
我知道如何将图片放在一个复选框中(通过css) 但这个例子: 我想把复选框放在图片中的每个数字正好在这个位置。复选框也可以位于图片旁边,但位置准确 我们如何做到这一点Php 图片中的多个复选框,php,html,css,checkbox,Php,Html,Css,Checkbox,我知道如何将图片放在一个复选框中(通过css) 但这个例子: 我想把复选框放在图片中的每个数字正好在这个位置。复选框也可以位于图片旁边,但位置准确 我们如何做到这一点 感谢您的帮助您想将复选框置于绝对位置吗?您可以在css中使用绝对值: div.container{ 位置:相对位置; } .chk1{ 位置:绝对位置; 左:50px; 顶部:50px; } .chk2{ 位置:绝对位置; 左:65px; 顶部:65px; } .chk3{ 位置:绝对位置; 左:80px; 顶部:80px;
感谢您的帮助您想将复选框置于绝对位置吗?您可以在css中使用
绝对值
:
div.container{
位置:相对位置;
}
.chk1{
位置:绝对位置;
左:50px;
顶部:50px;
}
.chk2{
位置:绝对位置;
左:65px;
顶部:65px;
}
.chk3{
位置:绝对位置;
左:80px;
顶部:80px;
}
是否要将复选框置于绝对位置?您可以在css中使用
绝对值
:
div.container{
位置:相对位置;
}
.chk1{
位置:绝对位置;
左:50px;
顶部:50px;
}
.chk2{
位置:绝对位置;
左:65px;
顶部:65px;
}
.chk3{
位置:绝对位置;
左:80px;
顶部:80px;
}
图{
背景:url(“https://i.stack.imgur.com/aS3WP.jpg)无重复;
宽度:242px;
高度:197px;
位置:相对位置;
}
poin1先生{
左:165px;
底部:50px;
位置:绝对位置;
}
波因2先生{
左:165px;
底部:90px;
位置:绝对位置;
}
poin3先生{
左:155px;
底部:125px;
位置:绝对位置;
}
poin4先生{
左:180像素;
底部:122px;
位置:绝对位置;
}
图{
背景:url(“https://i.stack.imgur.com/aS3WP.jpg)无重复;
宽度:242px;
高度:197px;
位置:相对位置;
}
poin1先生{
左:165px;
底部:50px;
位置:绝对位置;
}
波因2先生{
左:165px;
底部:90px;
位置:绝对位置;
}
poin3先生{
左:155px;
底部:125px;
位置:绝对位置;
}
poin4先生{
左:180像素;
底部:122px;
位置:绝对位置;
}
图{
背景:url(“https://i.stack.imgur.com/aS3WP.jpg)无重复;
宽度:242px;
高度:197px;
位置:相对位置;
}
poin1先生{
左:165px;
底部:50px;
位置:绝对位置;
}
波因2先生{
左:165px;
底部:90px;
位置:绝对位置;
}
poin3先生{
左:155px;
底部:125px;
位置:绝对位置;
}
poin4先生{
左:180像素;
底部:122px;
位置:绝对位置;
}
图{
背景:url(“https://i.stack.imgur.com/aS3WP.jpg)无重复;
宽度:242px;
高度:197px;
位置:相对位置;
}
poin1先生{
左:165px;
底部:50px;
位置:绝对位置;
}
波因2先生{
左:165px;
底部:90px;
位置:绝对位置;
}
poin3先生{
左:155px;
底部:125px;
位置:绝对位置;
}
poin4先生{
左:180像素;
底部:122px;
位置:绝对位置;
}
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.pic{
background: url("https://i.stack.imgur.com/aS3WP.jpg") no-repeat;
width:242px;
height:197px;
position: relative;
}
.poin1{
left: 165px;
bottom:50px;
position: absolute;
}
.poin2{
left: 165px;
bottom:90px;
position: absolute;
}
.poin3{
left: 155px;
bottom:125px;
position: absolute;
}
.poin4{
left: 180px;
bottom:122px;
position: absolute;
}
</style>
</head>
<body>
<div class="pic">
<input type="checkbox" class="poin1">
<input type="checkbox" class="poin2">
<input type="checkbox" class="poin3">
<input type="checkbox" class="poin4">
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.pic{
background: url("https://i.stack.imgur.com/aS3WP.jpg") no-repeat;
width:242px;
height:197px;
position: relative;
}
.poin1{
left: 165px;
bottom:50px;
position: absolute;
}
.poin2{
left: 165px;
bottom:90px;
position: absolute;
}
.poin3{
left: 155px;
bottom:125px;
position: absolute;
}
.poin4{
left: 180px;
bottom:122px;
position: absolute;
}
</style>
</head>
<body>
<div class="pic">
<input type="checkbox" class="poin1">
<input type="checkbox" class="poin2">
<input type="checkbox" class="poin3">
<input type="checkbox" class="poin4">
</div>
</body>
</html>