我一直在网上搜索但找不到答案。是否可以在图像上/中覆盖或嵌入引导按钮?如果是这样,怎么样?
我有一个图像,我想覆盖一个自举按钮,所以看起来它嵌入在图像中。我希望按钮上有一个动态标签(例如某人的名字)。
答案 0 :(得分:28)
斯塔诺为我回答了这个问题!
“...是的按钮可以放在图片标签上方,例如:http://jsfiddle.net/ubWuX”
<强> HTML:强>
<div id="img_container">
<img src="http://jsfiddle.net/img/initializing.png"/>
<button class="button"> click here </button>
</div>
<强> CSS:强>
#img_container {
position:relative;
display:inline-block;
text-align:center;
border:1px solid red;
}
.button {
position:absolute;
bottom:10px;
right:10px;
width:100px;
height:30px;
}