私は、2つの円をボタンとして使用して、ある種の「2つのオプション選択ゲーム」を作ろうとしています。円の中にはテキストがあります。テキストは中央にあり、円からはみ出しません。しかし、テキストが大きすぎると、円の下にはみ出してしまいます。リスト内の円の中心にテキストを配置するにはどうすればよいですか?
HTML:
<body>
<header>
<h1>Choose</h1>
</header>
<ul>
<li>Read a book and lay on bed the whole day</li>
<li>Go outside and ride a bycicle with friends</li>
</ul>
</body>
CSS:
h1 {
text-align: center;
font-family: 'oswalditalic';
font-size: 48px;
margin: 0;
}
ul{
text-align: center;
padding: 0;
}
ul li{
font-family: 'oswalditalic';
display: inline-block;
list-style-type: none;
margin:15px 20px;
color: black;
font-size: 26px;
text-align: center;
height: 300px;
width: 300px;
line-height: 300px;
-moz-border-radius: 50%;
border-radius:50%;
background-color: blue;
}
https://jsfiddle.net/sf3dquLs/
非プログラミング関連の提案:bycicle自転車でなければなりません。 – JohannesB