[英]Bootstrap Text over Image responsive
I have this markup. 我有这个标记。 I am driving crazy, I really don't know how to do it.
我快疯了,我真的不知道该怎么做。 I was trying with a wrapper and an overlay but does´t work.
我正在尝试使用包装纸和覆盖纸,但是没有用。 It have to be responsive, the image and the text too.
它也必须响应,图像和文本也要响应。 Any help please.
请帮忙。 Thanks!
谢谢!
Here is my markup and css: 这是我的标记和CSS:
<div class="franja_blanca ">
<div class="container">
<div class="wrapper">
<div class="header-img">
<img class="img-responsive" src="../header/818.png" alt="">
</div>
<div class="overlay">
<div class="texto_naturopatia">
Here is my text 1</div>
</div>
</div>
</div>
</div>
.header-img{
text-align:center;
background-color:#fff;
display:inline-block;
}
.header-img img {
display:inline-block;
}
.wrapper {
display: inline-block;
position: relative;
}
.wrapper .overlay {
color: #333333;
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
}
.wrapper .overlay {
color: #333333;
}
.franja_blanca {
text-align:center;
height: 100px;
background-color:#fff;
}
Hey i made some coding for you, 嘿,我为你做了一些编码,
hope it helps! 希望能帮助到你!
Here is the demo link: https://jsfiddle.net/j5rc1eyL/2/ 这是演示链接: https : //jsfiddle.net/j5rc1eyL/2/
<div class="position">
<div class="greybg">
<p> HERE IS TEXT 2 HERE IS TEXT 2</p>
</div>
<div class="imagebox">
<p>IMAGE
<br>
<br>
<br>
HERE IS TEXT 1 HERE IS TEXT 1
</p>
</div>
</div>
.imagebox{
max-width:300px;
margin:auto;
padding: 5px;
background-color:#0F1955;
text-align:center;
color:white;
font-size:14px;
box-shadow: 2px 2px 5px black;
}
.greybg {
background-color: #575756;
color: #FFF;
padding: 50px 0px 5px;
text-align: center;
margin-bottom: -155px;
}
.position {
margin-top:70px
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.