diff --git a/style.css b/style.css index dfb3ced..35e422a 100644 --- a/style.css +++ b/style.css @@ -315,7 +315,9 @@ width: 100%; } -/* ====== 地図ピン(名前ラベル付き) ====== */ +/* ====================================== + ピンのレイアウト(安定版) +====================================== */ .custom-pin { display: flex; @@ -323,30 +325,32 @@ justify-content: center; } -/* 画像+名前セット全体 */ -.pin-root { +/* ピン本体+名前ラベルをまとめた箱 */ +.pin-box { display: flex; flex-direction: column; align-items: center; - transform: translateY(-20px); /* ちょっと上に持ち上げる(お好みで調整可) */ + transform: translateY(-10px); /* 高さ微調整 */ } -.pin-root-img { +/* ピン画像 */ +.pin-img { width: 32px; height: 32px; } -/* 名前ラベル(はみ出さない版) */ -.pin-root-label { +/* 名前ラベル(改良済み) */ +.pin-label { margin-top: 2px; + background: #fff; padding: 2px 6px; font-size: 12px; - background: #ffffff; - border: 1px solid #ccc; + border: 1px solid #999; border-radius: 6px; - max-width: 120px; /* ← 横に伸びすぎないよう制限 */ - white-space: nowrap; /* 改行しない */ - overflow: hidden; /* はみ出した部分は隠す */ - text-overflow: ellipsis; /* はみ出したとき「…」で省略 */ + white-space: nowrap; + max-width: 100px; + overflow: hidden; + text-overflow: ellipsis; text-align: center; + box-shadow: 0 2px 4px rgba(0,0,0,0.2); }