Make div transparent through parent div

后端 未结 4 1923
无人共我
无人共我 2021-01-23 00:00

I\'m trying to have a div on top of an image and inside that div to have a border or another div that is transparent so you can see the image below.

4条回答
  •  无人及你
    2021-01-23 00:25

    make the parent div position:relative and z-index:0 and make the child div position:absolute and z-index:10

    this is an example follow this example you can do it .

    .check
    {
    position:relative;
    width:100%;
    height:50%:
    z-index:0;
    }
    .check img
    {
    width:100%;
    height:50%;
    }
    .form-box
    {
        position: absolute;
        top:0;
        right:0;
        background-color:rgba(255,255,255,0.8);
        z-index:10;
        height:100%;
        padding-top:40px;
        width:50%;
    }
    
    

    BISWAJIT

提交回复
热议问题