WEBの便利ツール CSS クールなラジオボタン ジェネレーター

このエントリーをはてなブックマークに追加

クールなラジオボタン生成ツール

▼生成したラジオボタン


生成したソースを表示 生成結果のURL

CSSコード

.radio_ex input{
	display: none;
}
.radio_ex label{
	display: inline-block;
	position: relative;
	cursor: pointer;
	margin-left: 10px;
	padding: 10px 20px;
	color: #4e95b4;
	font-size: 15pt;
	text-align: center;
	line-height: 1;
}
.radio_ex label:before{
	position: absolute;
	content: "";
	top: 50%;
	left: -10px;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	background: #110803;
	border-radius: 50%;
}
.radio_ex input[type="radio"]:checked + label:after {
	position: absolute;
	content: "";
	top: 50%;
	left: -4px;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-radius: 50%;
	background: #ffffff;
	font-weight:bold;
}

HTMLコード

<form>
<div class="radio_ex">
    <input type="radio" name="s3" id="select_0" value="札幌" checked="checked" />
    <label for="select_0">札幌</label>
    <input type="radio" name="s3" id="select_1" value="東京" />
    <label for="select_1">東京</label>
    <input type="radio" name="s3" id="select_2" value="横浜" />
    <label for="select_2">横浜</label>
    <input type="radio" name="s3" id="select_3" value="京都" />
    <label for="select_3">京都</label>
</div>

<input type="submit" value="送信" />
</form>

▼以下を設定して下さい。

サンプル   サンプル   サンプル  

設定