jsp页面div浮动在上面

<div style="width: 135px;height: 135px;">
    <img src="12.jpg" alt="图片" width="135px" height="135px" class="img-rounded"/>
    <div style="width: 135px;height: 45px;margin-top: -45px;
            background-color: rgba(0,0,0,.3);
            position: absolute; /*必须要加上*/
            z-index: 1;/*这个值越大越好,表示距离屏幕越近,越在上层*/">
        <label>test</label>
    </div>
</div>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章