如何使用bootstrap 2.0将一个图像叠加到另一个图像上?

时间:2013-10-29 16:43:23

标签: html css twitter-bootstrap

我想使用bootstrap 2.0获取文本和图像覆盖。我疯了我怎么才能得到它?谢谢你的帮助。

Example

HTML

           <div class="row">
                <img id='bgtittle' src='img/header.jpg' />
                <div class="span8">
                    <img id='iphone' src='img/iphone.png' />
                </div>
                <div class="span4">
                    <h4>EVERMIC APP</h4>
                    <p>Aplicacion oficial para mostrar nuestros trabajos</p>
                    <p>
                        <a class="btn btn-primary btn-large">
                            Contacta con nosotros
                        </a>
                    </p>
                </div>
            </div>

CSS

 #bgtittle{
         position: relative;
         z-index: 1;
 }
 #iphone{
         position: relative;
         z-index: 2;
 }

1 个答案:

答案 0 :(得分:0)

执行此操作的唯一方法是将位置类型更改为绝对值。但是你还有其他问题,比如滚动。例如:

#bgtittle{
     position: absolute;
     top:0;
     left:0;
     z-index: 1;
}