提交者
Karson
!15 修复radio和checkbox样式对齐
Merge pull request !15 from 西集/master
正在显示
2 个修改的文件
包含
12 行增加
和
2 行删除
@@ -36,7 +36,7 @@ function build_radios($name, $list = [], $selected = null) | @@ -36,7 +36,7 @@ function build_radios($name, $list = [], $selected = null) | ||
36 | { | 36 | { |
37 | $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::radio($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"])); | 37 | $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::radio($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"])); |
38 | } | 38 | } |
39 | - return implode(' ', $html); | 39 | + return '<div class="radio">' . implode(' ', $html) . '</div>'; |
40 | } | 40 | } |
41 | 41 | ||
42 | /** | 42 | /** |
@@ -55,7 +55,7 @@ function build_checkboxs($name, $list = [], $selected = null) | @@ -55,7 +55,7 @@ function build_checkboxs($name, $list = [], $selected = null) | ||
55 | { | 55 | { |
56 | $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::checkbox($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"])); | 56 | $html[] = sprintf(Form::label("{$name}-{$k}", "%s {$v}"), Form::checkbox($name, $k, in_array($k, $selected), ['id' => "{$name}-{$k}"])); |
57 | } | 57 | } |
58 | - return implode(' ', $html); | 58 | + return '<div class="checkbox">' . implode(' ', $html) . '</div>'; |
59 | } | 59 | } |
60 | 60 | ||
61 | /** | 61 | /** |
@@ -731,4 +731,14 @@ table.table-template{ | @@ -731,4 +731,14 @@ table.table-template{ | ||
731 | /*平板样式*/ | 731 | /*平板样式*/ |
732 | @media (max-width: @screen-tablet) { | 732 | @media (max-width: @screen-tablet) { |
733 | 733 | ||
734 | +} | ||
735 | + | ||
736 | +/*修复radio和checkbox样式对齐*/ | ||
737 | +.radio, .checkbox { | ||
738 | + > label { | ||
739 | + margin-right: 10px; | ||
740 | + > input { | ||
741 | + margin: 2px 0 0; | ||
742 | + } | ||
743 | + } | ||
734 | } | 744 | } |
-
请 注册 或 登录 后发表评论