feat: make character small

This commit is contained in:
sangge 2023-12-01 21:10:17 +08:00
parent c73892102c
commit d9e14d0352

View File

@ -6,18 +6,24 @@
<title>秦始皇餐厅</title> <title>秦始皇餐厅</title>
<style> <style>
body { body {
background-image: url('src/pic/desktop.png'); /* 替换为您的餐厅背景图片路径 */ background-image: url('src/pic/desktop.png');
background-repeat: no-repeat; background-repeat: no-repeat;
} }
#restaurant .character { #desktop{
position: absolute; background-image: url('src/pic/background.png');
width: 128px; /* 固定图片的宽度 */ background-repeat: no-repeat;
transform:scale(0.5);
} }
#restaurant .dish { #restaurant .character img {
position: absolute; position: absolute;
width: 128px; /* 固定图片的宽度 */ top: 0px;
transform:scale(0.3); width: 1024px;
height: 1024px;
}
#restaurant .dish img {
position: absolute;
left: 1000px;
width: 512px;
height: 512px;
} }
/* 根据图片实际位置调整left和top值 */ /* 根据图片实际位置调整left和top值 */
#customer1 { /* 中年男 */ #customer1 { /* 中年男 */
@ -46,6 +52,9 @@
<body> <body>
<!-- 游戏的界面元素 --> <!-- 游戏的界面元素 -->
<div id="restaurant"> <div id="restaurant">
<div id="desktop">
<img src="src/pic/desktop.png" alt="desktop">
</div>
<div id="customer1" class="character"> <div id="customer1" class="character">
<img src="src/pic/Customer1_YoungMan.png" alt="中年男"> <img src="src/pic/Customer1_YoungMan.png" alt="中年男">
</div> </div>