【发布时间】:2018-08-11 20:39:00
【问题描述】:
我想创建一个作为按钮的 div,它包含一张国旗图片和一个国家/地区的 abv,我已经将一些代码放入我想要的内容中,但它不是引导程序的方式,我我很难理解它以及如何使用引导程序来做到这一点。
<div class="countrylink">
<div class="abvcountry">
AFG
</div>
<div class="countryflag">
<img src="../../Downloads/afghanistan_texture.gif">
</div>
这是样式。
.countrylink {
position:relative;
width: 260px;
height: 60px;
background:olivedrab;
margin-left: 55px;
margin-top: 20px;
float:left;
}
.abvcountry {
position:absolute;
display: inline;
background-color:#FFBF55;
width: 60px;
background:tomato;
height:60px;
left:0px;
}
.countryflag {
position: absolute;
display: inline;
background-color: #0FF;
width: 200px;
background: blue;
left: 60px;
height: 60px;
}
.countryflag img {
width: 100%;
height: 100%;
}
我只是觉得通过 Bootstrap 显示在手机或平板电脑上会更好看
【问题讨论】:
标签: html twitter-bootstrap button bootstrap-4