LoginSignup
3
2

More than 5 years have passed since last update.

FlatUIでラジオボタンをスタイリングする方法

Posted at

FlatUI http://designmodo.github.io/Flat-UI/
は、TwitterBootstrapをベースにしたUIコンポーネントです。
フォーム部品もいい感じのものが揃っていて便利です。

今回はFlatUIを使ったラジオボタンのスタイリングをやります。
まずはラジオボタンのマークアップをします。

<label class="radio">
  <input type="radio" name="color" value="blue" data-toggle="radio"><input type="radio" name="color" value="red" data-toggle="radio"></label>

次にラジオボタン生成用のスクリプトを読み込みます。
これはダウンロードしたリソースの中に入っているものです。

<script src="flatui-radio.js"></script>
<script>
  $(function(){
    $(':radio').radio();
  });
</script>

これでOKです。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2