Make the image go behind the text and keep it in center using CSS

前端 未结 7 1507
粉色の甜心
粉色の甜心 2021-02-07 04:10

I am creating a web page, where I have an image that I want to place in the center. On the top of that image I want to have input boxes, labels, and a submit button.

I a

7条回答
  •  时光取名叫无心
    2021-02-07 04:42

    There are two ways to handle this.

    • Background Image
    • Using z-index property of CSS

    The background image is probably easier. You need a fixed width somewhere.

    .background-image {
        width: 400px;
        background: url(background.png) 50% 50%;
    }
    

提交回复
热议问题