gpt4 book ai didi

html - bootstrap,如何将文本放在 div 中的图像上

转载 作者:行者123 更新时间:2023-11-28 05:56:42 25 4
gpt4 key购买 nike

enter image description here我有一个 col-md-6 div,其中已经放置了一个图像,我需要在图像的 Logo 下方专门放置一些文本。每次尝试都将其放在图像下方,请帮忙。我还没有 CSS

<div class=".container-fluid">
<div class="set7">
<div class="row">
<div class="col-md-6 text-center">
<img src="images/dpfront1.png">
<h6>Copyright &copy; 2016 DepotSquare.All Rights Reserved. </h6>

</div>
</div>
<div class="col-md-6">.col-md-6</div>


</div>
</div>
</div>

最佳答案

这是你想要的吗?

.image {
position: relative;
width: 100%;
/* for IE 6 */
}
#img_head {
position: absolute;
//top: 10px;
left: 0;
width: 100%;
}
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>


<div class=".container-fluid">
<div class="set7">
<div class="row text-center">
<div class="col-md-6 text-center image">
<img src="http://3.bp.blogspot.com/-JhISDA9aj1Q/UTECr1GzirI/AAAAAAAAC2o/5qmvWZiCMRQ/s1600/Twitter.png">

<div class="col-md-6" id="img_head">.col-md-6
<br />
<h6>Copyright &copy; 2016 DepotSquare.All Rights Reserved. </h6>
</div>

</div>

</div>



</div>
</div>
</div>

.col-md-6 替换为您想要的任何文本。

关于html - bootstrap,如何将文本放在 div 中的图像上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37032407/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com