etozhematvekat
@etozhematvekat
Вряд ли Вы не сможете ответить на мой вопрос.

Как оформить checkbox?

vK8poHIY0k8.jpg

Можно ли задать цвет чебоксу?
  • Вопрос задан
  • 207 просмотров
Решения вопроса 2
hronik87
@hronik87
Обитаю в 1С-Bitrix
label, before, after ваши лучшие помощники)
Ответ написан
@senselessV7
<input type="checkbox" name="ch" id="ch">
<label for="ch"></label>

label {
  display: block;
  width: 20px;
  height: 20px;
  background: #fff;
  border:2px solid red;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

label:after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background: red;
  border-radius: 50%;
  position: absolute;
  top:0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 5px;
  display: none;
}

input[type="checkbox"]{
  display: none;
}

input[type="checkbox"]:checked~label:after {
  display: block;
}


jsbin
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы