css3: background-image使用多个背景图像

CSS3 允许元素使用多个背景图像。

background-image: url(img/ic_ms.png),url(img/icon_dutyfree_invite.png);

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            .bgmore{
                width: 1000px;
                height: 1000px;
                background-image: url(img/ic_ms.png),url(img/icon_dutyfree_invite.png);
                background-clip: border-box;
                background-size: 100% 100%;
                /*background-size: cover;*/
                /*background-size: contain;*/
                border: 1px solid #000;
            }
        </style>
    </head>
    <body>
        <div class="bgmore"></div>
    </body>
</html>

效果:

原文地址:https://www.cnblogs.com/xiangru0921/p/6508393.html