LoginSignup
57
54

More than 5 years have passed since last update.

チェックボックスを大きくしたい

Last updated at Posted at 2015-06-13

table_with_checkbox01.png

ここにチェックボックスを内包した td 要素を持つテーブルがあります (画像は Google Chrome v43 で表示したものです) 。
うーん、ちょっとチェックボックスが小さすぎてクリックしずらいです。
なんとかして大きくできないかなぁ…。

調べてみたら transform という CSS プロパティを発見しました。

input[type=checkbox] {
  transform: scale(1.5);
}

table_with_checkbox02.png

\\\٩( 'ω' )و//// 大きくなった!

ただし transform は CSS3 のプロパティなので、
Compass のミックスインを使ってベンダープレフィックスを付けたほうが安心ですかね。

@import 'compass';

input[type=checkbox] {
  @include scale(1.5);
}

この SCSS は以下の様な CSS に変換されます。

input[type=checkbox] {
  -ms-transform: scale(1.5, 1.5);
  -webkit-transform: scale(1.5, 1.5);
  transform: scale(1.5, 1.5);
}
57
54
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
57
54