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>

效果:

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

 

相关文章:

  • 2022-01-09
  • 2022-02-11
  • 2021-04-20
  • 2022-12-23
  • 2022-02-10
  • 2022-01-19
  • 2021-12-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2021-11-12
相关资源
相似解决方案