1. 程式人生 > >html-背景圖片

html-背景圖片

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        .da{
            border: 1px solid black;
            height: 400px;
            width
: 800px; margin: 20px auto; background: url("image2/2.png"); background-repeat: no-repeat; background-size: 200px; background-position: right 40px; } </style> </head> <body> <div class="da"></div> </body
> </html>

效果圖: