在开发中有时候会需要为一个div添加多个背景图片,可以用如下方法实现:
1. css样式
/*logo条*/
.logo{
width:290px;
height:80px;
background-color: #2658fe;
background-image: url(../../public/images/logo.png), url(../../public/img/down_nav.png);
background-position: 37% 50%, 92% 50%;
background-size:152px 46px, 30px 30px;
background-repeat:no-repeat ;
}
2. html
<div class="logo" title="点击跳转到疫情平台大屏页面" onclick="window.open('https://222.84.250.42/hpVue/#/index','_self')">
效果: