Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Стилизация checkbox и radio на CSS


Recommended Posts

Здравствуйте!

Не как не могу прописать стили для checkbox.

Вкладка собрать

https://doorbravo.ru/mezhkomnatnye-dveri/pvh/skinny/mezhkomnatnaya-dver-s-pvh-plenkoy-skinni-20-belaya.html

Прописано так:

#product .complect-popup-products input[type="checkbox"],
#product .complect-popup-products input[type="radio"] {
    margin: 4px 0 0;
    margin-right: 0px;
    margin-top: 1px \9;
    line-height: normal;
    margin-right: 4px;
}
#product .complect-popup-products input[type="checkbox"]:before,
#product .complect-popup-products input[type="radio"]:before {
    height: 8px;
    width: 8px;
    position: absolute;
    content: '';
    display: inline-block;
    font-size: 9px;
    text-align: center;
    line-height: 14px;
    background: #000;
    top: 3px;
    left: 3px;
    border-radius: 50%;
}
#product .complect-popup-products input[type="checkbox"]:after,
#product .complect-popup-products input[type="radio"]:after {
    -webkit-animation: click-wave 0.65s;
    -moz-animation: click-wave 0.65s;
    animation: click-wave 0.65s;
    background: #444;
    content: '';
    display: block;
    position: relative;
    z-index: 100;
}

Стили видит но нужного результата нет

 

f91b2b95-a315-47ef-829d-36f5abc61aa6.png

Надіслати
Поділитися на інших сайтах


  В 24.06.2018 в 18:39, NDemidov сказав:

где эта вкладка?

Expand  

это квест для покупателя, а я нашел :cool:

 

https://www.w3schools.com/howto/howto_css_custom_checkbox.asp

 

Надіслати
Поділитися на інших сайтах

  В 24.06.2018 в 19:17, NDemidov сказав:

нашел)

в каком виде они должны быть? (сss какой-то странный)

Expand  

Как в фильтре только темный

https://doorbravo.ru/mezhkomnatnye-dveri/

Надіслати
Поділитися на інших сайтах


  В 24.06.2018 в 19:45, helen2014 сказав:

Как в фильтре только темный

https://doorbravo.ru/mezhkomnatnye-dveri/

Expand  

 

тогда вроде так:

#product .complect-popup-products input[type="checkbox"], 
#product .complect-popup-products input[type="radio"] {
    vertical-align: middle;
    border-radius: 50%;
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    -o-appearance: none;
    bottom: 2px;
    height: 16px;
    width: 16px;
    -webkit-transition: all 0.15s ease-out 0s;
    -moz-transition: all 0.15s ease-out 0s;
    transition: all 0.15s ease-out 0s;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    outline: none;
    z-index: 5;
    border: 1px solid #000;
    line-height: normal;
    box-sizing: border-box;
    padding: 0;
}

#product .complect-popup-products input[type="checkbox"]:before, 
#product .complect-popup-products input[type="radio"]:before {
    height: 8px;
    width: 8px;
    position: absolute;
    content: '';
    display: inline-block;
    font-size: 9px;
    text-align: center;
    line-height: 14px;
    background: #000;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

::after можно удалить

  • +1 1
Надіслати
Поділитися на інших сайтах


  В 24.06.2018 в 20:01, NDemidov сказав:

 

тогда вроде так:

#product .complect-popup-products input[type="checkbox"], 
#product .complect-popup-products input[type="radio"] {
    vertical-align: middle;
    border-radius: 50%;
    position: relative;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-appearance: none;
    -o-appearance: none;
    bottom: 2px;
    height: 16px;
    width: 16px;
    -webkit-transition: all 0.15s ease-out 0s;
    -moz-transition: all 0.15s ease-out 0s;
    transition: all 0.15s ease-out 0s;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    outline: none;
    z-index: 5;
    border: 1px solid #000;
    line-height: normal;
    box-sizing: border-box;
    padding: 0;
}

#product .complect-popup-products input[type="checkbox"]:before, 
#product .complect-popup-products input[type="radio"]:before {
    height: 8px;
    width: 8px;
    position: absolute;
    content: '';
    display: inline-block;
    font-size: 9px;
    text-align: center;
    line-height: 14px;
    background: #000;
    top: 3px;
    left: 3px;
    border-radius: 50%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

::after можно удалить

Expand  

Получилось что они все включены!

Посмотрите в карточки.

Нужно чтобы переключались

Надіслати
Поділитися на інших сайтах


ну и наведение еще:

#product .complect-popup-products input[type="checkbox"]:hover, 
#product .complect-popup-products input[type="radio"]:hover {
    border: 1px solid #9c2e03;
}
#product .complect-popup-products input[type="checkbox"]:checked:hover:before, 
#product .complect-popup-products input[type="radio"]:checked:hover:before {
    background: #9c2e03;
}

 

Надіслати
Поділитися на інших сайтах


  В 24.06.2018 в 20:11, NDemidov сказав:

#product .complect-popup-products input[type="checkbox"]:checked:before, 
#product .complect-popup-products input[type="radio"]:checked:before

Expand  

В роди все получилось.

Большое спасибо!

Надіслати
Поділитися на інших сайтах


Створіть аккаунт або увійдіть для коментування

Ви повинні бути користувачем, щоб залишити коментар

Створити обліковий запис

Зареєструйтеся для отримання облікового запису. Це просто!

Зареєструвати аккаунт

Вхід

Уже зареєстровані? Увійдіть тут.

Вхід зараз
  • Зараз на сторінці   0 користувачів

    • Ні користувачів, які переглядиють цю сторінку
×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.