1 Star 1 Fork 0

lsyanling/HTML Restaurant Game

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
restaurant.css 12.96 KB
一键复制 编辑 原始数据 按行查看 历史
lsyanling 提交于 2021-10-27 19:14 . 第一次提交
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764
/*
顺序:display,position,width,height,overflow,flex-direction,align,justify,border,background,solid,width,color,radius
*/
body {
display: flex;
width: 100%;
height: 100vh;
align-items: center;
background-image: url(restaurant/dose-juice-sTPy-oeA3h0-unsplash.jpg);
background-size: cover;
background-repeat: no-repeat;
}
#black-shadow {
display: none;
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(88, 88, 88, 0.5);
z-index: 1;
}
#food-menu {
display: none;
position: absolute;
flex-direction: column;
align-items: center;
box-sizing: border-box;
width: 96%;
height: 81%;
border-style: solid;
border-width: 4px;
border-color: white;
border-radius: 17px;
background-color: rgb(255, 217, 112);
z-index: 2;
}
#menu-board {
display: flex;
position: absolute;
flex-direction: column;
overflow: hidden;
align-items: center;
box-sizing: border-box;
width: 80%;
height: 70%;
top: 15%;
font-size: 13px;
color: rgb(151, 103, 0);
border-style: solid;
border-width: 4px;
border-color: rgb(151, 103, 0);
border-radius: 17px;
background-color: white;
}
.all-dishes {
position: relative;
left: -10%
}
.dishes {
margin: 0px;
}
.order-two-choice {
display: flex;
position: relative;
width: 100%;
height: 8%;
top: 87%;
align-items: center;
justify-content: space-around;
margin: 2%;
}
#order-yes {
display: flex;
position: relative;
overflow: hidden;
align-items: center;
justify-content: space-around;
width: 50%;
height: 100%;
color: rgb(85, 73, 5);
font-size: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(122, 106, 12);
border-radius: 25px;
}
#order-no {
display: flex;
position: relative;
overflow: hidden;
align-items: center;
justify-content: space-around;
width: 30%;
height: 100%;
color: rgb(85, 73, 5);
font-size: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(122, 106, 12);
border-radius: 25px;
}
#order-message {
position: absolute;
width: 60%;
height: 20%;
top: 5%;
left: 35%;
}
#order-img {
position: absolute;
top: -5%;
left: 5%;
}
#start-window {
display: flex;
position: absolute;
flex-direction: column;
overflow: hidden;
align-items: center;
box-sizing: border-box;
width: 96%;
height: 30%;
top: 30%;
border-style: solid;
border-width: 4px;
border-color: white;
border-radius: 17px;
background-color: rgb(255, 217, 112);
z-index: 2;
}
#start-game {
display: flex;
position: relative;
overflow: hidden;
align-items: center;
justify-content: space-around;
width: 90%;
height: 22%;
color: rgb(85, 73, 5);
font-size: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(122, 106, 12);
border-radius: 30px;
margin-top: 10px;
}
.recruit-window {
display: none;
position: absolute;
flex-direction: column;
overflow: hidden;
align-items: center;
box-sizing: border-box;
width: 96%;
height: 30%;
top: 30%;
border-style: solid;
border-width: 4px;
border-color: white;
border-radius: 17px;
background-color: rgb(255, 217, 112);
z-index: 2;
}
#recruit-yes {
display: flex;
position: relative;
overflow: hidden;
align-items: center;
justify-content: space-around;
width: 50%;
height: 100%;
color: rgb(85, 73, 5);
font-size: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(122, 106, 12);
border-radius: 25px;
}
#recruit-no {
display: flex;
position: relative;
overflow: hidden;
align-items: center;
justify-content: space-around;
width: 30%;
height: 100%;
color: rgb(85, 73, 5);
font-size: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(122, 106, 12);
border-radius: 25px;
}
.fire-window {
display: none;
position: absolute;
flex-direction: column;
overflow: hidden;
align-items: center;
box-sizing: border-box;
width: 96%;
height: 30%;
top: 30%;
border-style: solid;
border-width: 4px;
border-color: white;
border-radius: 17px;
background-color: rgb(255, 217, 112);
z-index: 2;
}
.head {
font-size: 25px;
margin: 2%;
}
.text {
margin: 1% 5% 1% 5%;
}
.two-choice {
display: flex;
width: 100%;
height: 20%;
align-items: center;
justify-content: space-around;
margin: 2%;
}
#fire-yes {
display: flex;
position: relative;
overflow: hidden;
align-items: center;
justify-content: space-around;
width: 50%;
height: 100%;
color: rgb(85, 73, 5);
font-size: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(122, 106, 12);
border-radius: 25px;
}
#fire-no {
display: flex;
position: relative;
overflow: hidden;
align-items: center;
justify-content: space-around;
width: 30%;
height: 100%;
color: rgb(85, 73, 5);
font-size: 20px;
border-style: solid;
border-width: 2px;
border-color: rgb(122, 106, 12);
border-radius: 25px;
}
#time {
display: flex;
position: absolute;
overflow: hidden;
align-items: center;
justify-content: space-around;
width: 25%;
height: 4%;
top: 2%;
left: 2%;
color: rgb(85, 73, 5);
font-size: 14px;
border-style: solid;
border-width: 5px;
border-color: rgb(122, 106, 12);
border-radius: 20px;
background-color: rgb(255, 217, 112);
}
#money {
display: flex;
position: absolute;
overflow: hidden;
align-items: center;
justify-content: center;
width: 50%;
height: 4%;
top: 2%;
right: 2%;
color: rgb(85, 73, 5);
font-size: 14px;
border-style: solid;
border-width: 5px;
border-color: rgb(122, 106, 12);
border-radius: 20px;
background-color: rgb(255, 217, 112);
}
.shadow-time-money {
position: absolute;
width: 100%;
height: 50%;
top: 0%;
background-color: rgba(255, 255, 255, 0.4);
}
.shadow-cook-bar {
position: absolute;
box-sizing: border-box;
width: 0px;
height: 20px;
top: 60px;
left: 0%;
background-color: rgba(255, 255, 255, 0.4);
}
.shadow-seat-bar {
position: absolute;
box-sizing: border-box;
width: 0px;
height: 20px;
left: 60px;
background-color: rgba(255, 255, 255, 0.4);
}
.shadow-queue-bar {
position: absolute;
box-sizing: border-box;
width: 0px;
height: 20px;
top: 60px;
left: 0%;
background-color: rgba(255, 255, 255, 0.4);
}
#money-value {
position: absolute;
right: 10%;
}
#div-chef-block {
display: grid;
grid-template-columns: repeat(auto-fill, 100px);
position: absolute;
align-items: center;
justify-content: space-around;
box-sizing: border-box;
flex-wrap: wrap;
height: 36%;
width: 96%;
top: 10%;
border-style: solid;
border-width: 5px;
border-color: white;
background-color: rgb(255, 217, 112);
border-radius: 15px;
}
#div-customer-block {
display: grid;
grid-template-columns: repeat(auto-fill, 135px);
position: absolute;
align-items: center;
justify-content: space-around;
box-sizing: border-box;
flex-wrap: wrap;
height: 36%;
width: 96%;
top: 50%;
border-style: solid;
border-width: 5px;
border-color: white;
background-color: rgb(255, 166, 0);
border-radius: 15px;
}
#div-queue-block {
display: flex;
position: absolute;
align-items: center;
justify-content: space-around;
box-sizing: border-box;
flex-wrap: wrap;
height: 18%;
width: 96%;
top: 78%;
}
.div-chef {
display: flex;
position: relative;
box-sizing: border-box;
height: 80px;
width: 80px;
border-style: solid;
border-width: 4px;
border-radius: 50%;
border-color: white;
margin: 10px;
}
.div-chef-busy {
background-color: rgb(255, 115, 0);
}
.div-chef-complete {
background-color: rgb(128, 74, 255);
}
.div-chef-free {
background-color: rgb(175, 175, 175);
}
.chef-img-block {
overflow: hidden;
}
.chef-filter {
position: absolute;
width: 100%;
height: 100%;
left: -1000px;
filter: drop-shadow(1000px 0px white);
}
.chef-img {
width: 100%;
height: 100%;
}
.shadow-chef-customer {
position: absolute;
width: 50%;
height: 100%;
border-radius: 50% 0 0 50%;
background-color: rgba(255, 255, 255, 0.3);
}
.chef-bar {
position: absolute;
box-sizing: border-box;
width: 72px;
height: 20px;
top: 60px;
font-size: 12px;
color: white;
text-align: center;
border-style: solid;
border-width: 2px;
border-color: white;
border-radius: 2px;
}
.cooking-bar {
background-color: rgb(255, 115, 0);
}
.complete-bar {
background-color: rgb(169, 119, 250);
}
.add-block {
display: flex;
position: absolute;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.delete-block {
display: flex;
position: absolute;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
left: 80%;
transform: translate(-50%, -50%);
transform: rotate(45deg);
}
.multiply-row {
position: absolute;
width: 20px;
height: 5px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgb(194, 160, 49);
}
.multiply-column {
position: absolute;
width: 5px;
height: 20px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgb(194, 160, 49);
}
.div-complete {
position: absolute;
width: 80%;
height: 80%;
right: 50%;
top: 30%;
}
.img-complete {
width: 100%;
height: 100%;
}
.block-hidden {
display: none;
}
.div-seat {
display: flex;
position: relative;
box-sizing: border-box;
height: 80px;
width: 80px;
border-style: solid;
border-width: 4px;
border-radius: 50%;
border-color: white;
margin: 10px;
background-color: rgb(175, 175, 175);
}
.div-seat-none {
background-color: rgb(175, 175, 175);
}
.div-seat-eating {
background-color: rgb(255, 115, 0);
}
.div-seat-wait {
background-color: rgb(233, 3, 3);
}
.div-seat-angry {
background-color: rgb(121, 0, 0);
}
.div-seat-check-out {
background-color: rgb(15, 189, 29);
}
.customer-bar {
position: absolute;
box-sizing: border-box;
width: 72px;
height: 20px;
left: 60px;
font-size: 12px;
color: white;
text-align: center;
border-style: solid;
border-width: 2px;
border-color: white;
border-radius: 2px;
}
.bar0 {
top: 0px;
}
.bar1 {
top: 25px;
}
.bar2 {
top: 50px;
}
.customer-bar-line {
position: absolute;
width: 60px;
height: 1px;
left: 66px;
background-color: white;
}
.bar0-line {
top: 10px;
}
.bar1-line {
top: 35px;
}
.bar2-line {
top: 60px;
}
.wait-bar {
background-color: rgb(233, 3, 3);
}
.dish-up {
position: absolute;
box-sizing: border-box;
width: 21px;
height: 21px;
left: 132px;
border-style: solid;
border-width: 2px;
border-color: white;
border-radius: 50%;
background-color: red;
}
.img-dish-up {
width: 100%;
height: 100%;
}
#dish-up00,
#dish-up10,
#dish-up20,
#dish-up30 {
top: -1px;
}
#dish-up01,
#dish-up11,
#dish-up21,
#dish-up31 {
top: 25px;
}
#dish-up02,
#dish-up12,
#dish-up22,
#dish-up32 {
top: 51px;
}
.eating-bar {
background-color: rgb(255, 115, 0);
}
.not-eat-bar {
background-color: rgb(97, 97, 97);
}
.check-out-bar {
background-color: rgb(15, 189, 29);
}
.div-appease {
position: absolute;
width: 80%;
height: 80%;
right: 50%;
top: 50%;
}
.img-appease {
width: 100%;
height: 100%;
}
.div-check {
position: absolute;
width: 80%;
height: 80%;
right: 50%;
top: 50%;
}
.img-check {
width: 100%;
height: 100%;
}
.div-customer {
position: absolute;
box-sizing: border-box;
height: 80px;
width: 80px;
border-style: solid;
border-width: 4px;
border-radius: 50%;
border-color: white;
background-color: rgb(0, 110, 255);
}
.customer-img {
width: 100%;
height: 100%;
}
#queue0 {
right: 10px;
}
#queue1 {
right: 70px;
}
#queue2 {
right: 130px;
}
#queue3 {
right: 190px;
}
#queue4 {
right: 250px;
}
#queue5 {
right: 310px;
}
.queue-bar {
position: absolute;
box-sizing: border-box;
width: 72px;
height: 20px;
top: 60px;
font-size: 12px;
color: white;
text-align: center;
border-style: solid;
border-width: 2px;
border-color: white;
border-radius: 2px;
background-color: rgb(0, 110, 255);
}
/*
.food-menu-checkbox {
pointer-events: none;
}
*/
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lsyanling/html-restaurant-game.git
git@gitee.com:lsyanling/html-restaurant-game.git
lsyanling
html-restaurant-game
HTML Restaurant Game
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385