rance/styles.css
2025-01-15 17:19:04 +08:00

58 lines
1,017 B
CSS

/* 賽道上每匹馬的初始位置 */
.horse {
position: absolute;
left: 0;
top: 0;
transition: left 0.5s linear;
}
/* 調整每匹馬的垂直位置 */
#racehorse1 { top: 20px; }
#racehorse2 { top: 80px; }
#racehorse3 { top: 140px; }
#racehorse4 { top: 200px; }
#racehorse5 { top: 260px; }
#result {
text-align: center;
font-size: 1.2em;
font-weight: bold;
}
/* 名次列表樣式 */
#rankings {
margin-top: 20px;
text-align: left;
display: inline-block;
}
/* 起跑線樣式 */
.starting-line {
position: absolute;
left: 10%;
top: 0;
width: 4px;
height: 100%;
background-color: green;
}
/* 終點線樣式 */
.finish-line {
position: absolute;
right: 10%;
top: 0;
width: 4px;
height: 100%;
background-color: red;
}
/* 馬匹圖片 */
.horse img {
width: 50px;
height: 30px;
}
/* 障礙馬匹時的透明度 */
.horse.finished img {
opacity: 0.7;
}