goTOP
April 6, 2015

用 CSS 製作大型 Checkbox

| |
網頁語言 » CSS | 閱覽(8148) | Posted by apao at 21:28
點擊在新視窗中瀏覽此圖片

HTML Source
<input type="checkbox" class="bLarger" name="checkBox">


Source Code
<style type="text/css">
input.bLarger{width: 20px; height: 20px;}</style>


使用 font-size:200%; 也不見效。

▼幸運的是手機也能呈現
點擊在新視窗中瀏覽此圖片

參考網站:
http://lab.artlung.com/larger-checkbox-with-css/

Firefox或是其他瀏覽器就要改用設定兩倍尺寸大小的方法
input[type=checkbox]
{
  /* Double-sized Checkboxes */
  -ms-transform: scale(2); /* IE */
  -moz-transform: scale(2); /* FF */
  -webkit-transform: scale(2); /* Safari and Chrome */
  -o-transform: scale(2); /* Opera */
  padding: 10px;
}


參考網站:
http://stackoverflow.com/questions/306924/checkbox-size-in-html-css
Facebook twitter LINEk
文章来自: 本站原創
0 Comment(s)
我要發表評論
暱稱
密碼 [ 訪客無需密碼 ]
電郵
網址
開啟HTML 開啟UBB 開啟表情 隱藏 記住我