feat: set img location
This commit is contained in:
parent
d9e14d0352
commit
574a2fb9fe
44
game.html
44
game.html
@ -15,7 +15,6 @@
|
|||||||
}
|
}
|
||||||
#restaurant .character img {
|
#restaurant .character img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
|
||||||
width: 1024px;
|
width: 1024px;
|
||||||
height: 1024px;
|
height: 1024px;
|
||||||
}
|
}
|
||||||
@ -25,27 +24,33 @@
|
|||||||
width: 512px;
|
width: 512px;
|
||||||
height: 512px;
|
height: 512px;
|
||||||
}
|
}
|
||||||
/* 根据图片实际位置调整left和top值 */
|
|
||||||
#customer1 { /* 中年男 */
|
#qinshihuang img{ /* 秦始皇 */
|
||||||
left: 100px;
|
left: 100px;
|
||||||
top: 200px;
|
display: none;
|
||||||
}
|
}
|
||||||
#customer2 { /* 小女孩 */
|
#customer1 img{ /* 中年男 */
|
||||||
left: 200px;
|
left: 800px;
|
||||||
top: 200px;
|
display: none;
|
||||||
}
|
}
|
||||||
#customer3 { /* 老奶奶 */
|
#customer2 img{ /* 小女孩 */
|
||||||
left: 300px;
|
left: 800px;
|
||||||
top: 200px;
|
display: none;
|
||||||
}
|
}
|
||||||
#mapo-tofu { /* 麻婆豆腐 */
|
#customer3 img{ /* 老奶奶 */
|
||||||
left: 400px;
|
left: 800px;
|
||||||
|
|
||||||
|
}
|
||||||
|
#mapo-tofu img{ /* 麻婆豆腐 */
|
||||||
|
|
||||||
top: 500px;
|
top: 500px;
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
#roast-duck { /* 烤鸭 */
|
#roast-duck img{ /* 烤鸭 */
|
||||||
left: 500px;
|
|
||||||
top: 500px;
|
top: 500px;
|
||||||
/*display: none; /* 一开始不显示烤鸭 */
|
display: none;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
@ -55,6 +60,13 @@
|
|||||||
<div id="desktop">
|
<div id="desktop">
|
||||||
<img src="src/pic/desktop.png" alt="desktop">
|
<img src="src/pic/desktop.png" alt="desktop">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- empires elements-->
|
||||||
|
<div id="qinshihuang" class="character">
|
||||||
|
<img src="src/pic/QinShiHuang.png" alt="秦始皇">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- customers elements -->
|
||||||
<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>
|
||||||
@ -64,6 +76,8 @@
|
|||||||
<div id="customer3" class="character">
|
<div id="customer3" class="character">
|
||||||
<img src="src/pic/Customer3_OldLady.png" alt="老奶奶">
|
<img src="src/pic/Customer3_OldLady.png" alt="老奶奶">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- foods elements -->
|
||||||
<div id="mapo-tofu" class="dish">
|
<div id="mapo-tofu" class="dish">
|
||||||
<img src="src/pic/MapoTofu_FinishedDish.png" alt="麻婆豆腐">
|
<img src="src/pic/MapoTofu_FinishedDish.png" alt="麻婆豆腐">
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user