Browse Source

微调单选复选禁用样式

笔下光年 6 years ago
parent
commit
de6563bfea
2 changed files with 15 additions and 2 deletions
  1. 2 0
      README.md
  2. 13 2
      css/style.min.css

+ 2 - 0
README.md

@@ -27,6 +27,8 @@
 - perfect-scrollbar
 
 ### 更新记录
+2019.03.25 微调单选框和复选框禁用下的颜色
+
 2019.03.22 调整侧边栏隐藏/显示操作,开关改为一直可见,侧边栏自动隐藏临界值调整为1024px
 
 2019.03.21 新增多级菜单,调整侧边栏一些样式(多级菜单的滚动条位置还需要观察)

+ 13 - 2
css/style.min.css

@@ -568,8 +568,9 @@ input[type=radio] {
 }
 .lyear-checkbox input,
 .lyear-radio input {
-    position: absolute;
-    opacity: 0;
+    position: absolute;;
+    /*opacity: 0;*/
+    display: none;
 }
 .lyear-checkbox span::before,
 .lyear-radio span::before {
@@ -619,6 +620,16 @@ input[type=radio] {
     background-color: #ebebeb;
     border-color: #ebebeb;
 }
+.lyear-checkbox input:disabled + span,
+.lyear-radio input:disabled + span {
+    cursor: not-allowed;
+}
+.lyear-checkbox input:disabled + span::before,
+.lyear-checkbox input:disabled + span::after,
+.lyear-radio input:disabled + span::before,
+.lyear-radio input:disabled + span::after {
+    opacity: .4;
+}
 /* checkbox */
 .checkbox-primary input:checked~span::before {
     background-color: #33cabb;