问题遇到的现象和发生背景
vue中怎么设置背景平铺,铺满正页面,设置了但是图片显示不出来
用代码块功能插入代码,请勿粘贴截图
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<style>
#building{
background:url("../fruit/src/assets/1.3.png");
width:100%; //大小设置为100%
height:100%; //大小设置为100%
position:fixed;
background-size:100% 100%;}
</style>
</head>
<body>
<div id="building">
</div>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>