No video

Css Custom Animated Checkbox - How to make CSS switch / toggle / custom checkbox - No Javascript

  Рет қаралды 134,664

Online Tutorials

Online Tutorials

Күн бұрын

Enroll My Course : Next Level CSS Animation and Hover Effects
www.udemy.com/...
------------------
Join Our Channel Membership And Get Source Code Everyday
Join : / @onlinetutorialsyt
------------------
Please LIKE our Facebook page for daily updates...
/ online-tutorial-html-c...

Пікірлер: 110
@Funnycreature17
@Funnycreature17 4 жыл бұрын
Tags that don't close ( in this case) can't have pseudoelements. Although this might work in modern browsers, this is not a valid way to do it and won't work properly in IE11 for example. You gotta use ::before and ::after of the parent div (or label) instead.
@reallygood7580
@reallygood7580 4 жыл бұрын
this should get more likes, because its true
@MrHouloul
@MrHouloul 2 жыл бұрын
can you write it I dont understand
@Funnycreature17
@Funnycreature17 2 жыл бұрын
@@MrHouloul Ok I'll try. The markup in this tutorial is ... ... what I suggest doing instead is: ... ... Then you can hide actual input like this: .hidden-input-part:not(:focus):not(:active) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; border: 0; clip: rect(0 0 0 0); } and change selectors from this video like this: input[type="checkbox"] ---> .hidden-input-part + .visible-input-part input:checked [type="checkbox"]---> .hidden-input-part:checked + .visible-input-part input[type="checkbox"]::before ---> .hidden-input-part + .visible-input-part::before input:checked[type="checkbox"]::before ---> .hidden-input-part:checked + .visible-input-part::before There are like 5 more way to do this correctly that I know about, this one is just my go-to method.
@daylinjones7194
@daylinjones7194 4 жыл бұрын
THANK YOU!!! for breaking this down step by step. Didn't realize Wordpress was overriding my styling until I saw this video. Very GRATEFUL!!!
@zholy9
@zholy9 6 жыл бұрын
Just tried it today and managed to make it work. Line 46 (left:40px) on the "checked::before" didn't work for me with SMOOTH animation/transition = had to use TRANSLATE(100%). When I've left it like you have, for some reason the transition didn't "kick in" and the change of the button position was instant, rather then smooth/animated. BUT ... still - awesome job on this one. With such "styled checkbox" and SIBLING COMBINATOR I've managed to do a nice option between MONTHLY/YEARLY pricing tables ...
@reallygood7580
@reallygood7580 4 жыл бұрын
Win + Tab. Nice...
@Edthewebsurfer
@Edthewebsurfer 5 жыл бұрын
Simple and to the point, thank you for uploading.
@DcodeShow
@DcodeShow 4 жыл бұрын
Wow, you are the man, this is an incredible use of inputs. Thank you for sharing.
@nicolaszarate2439
@nicolaszarate2439 3 жыл бұрын
Thanks a lot. This tutorial was so helpful for a project.
@Coding_Tricks771
@Coding_Tricks771 6 ай бұрын
Thank you very much this help me lot
@leonardocamargo5412
@leonardocamargo5412 4 жыл бұрын
Melhor vídeo sobre o assunto não pode existir xD. Muito simples de se fazer, as pausas no codigo para mostrar como está ficando são muito boas para o aprendizado. Parabéns pelo trabalho!!!
@animartedev
@animartedev 2 жыл бұрын
however if you create more than one button it generates a bug the little ball of the second or third button goes to the place where the first switch is, it only works if it is with only 1 button
@gyros9162
@gyros9162 Жыл бұрын
this is cool and beautiful
@RenardBergson
@RenardBergson Жыл бұрын
Thank you! You're the best css player hehe
@ldawg214
@ldawg214 7 жыл бұрын
You should add comments to your code so viewers can get an idea of what you're doing. For example, the center class is only for your tutorial and is not needed in a real project. Unless the checkbox needs to be in the center of the screen. Other than that, I get a ton of ideas from you. Keep it up.
@ivanpoberezhniuk9694
@ivanpoberezhniuk9694 5 жыл бұрын
btw, it's obvious
@iliasselaissi3890
@iliasselaissi3890 2 жыл бұрын
this is the easy way to do it
@revanth9272
@revanth9272 4 жыл бұрын
I learnt a lot from you👍.
@ismotarasrity4696
@ismotarasrity4696 4 жыл бұрын
Thanks
@sujandrn6186
@sujandrn6186 4 жыл бұрын
i really love it......
@OnlineTutorialsYT
@OnlineTutorialsYT 4 жыл бұрын
Great
@eypbal
@eypbal 7 жыл бұрын
This is so perfect. Thanksssss
@emre-vt6zi
@emre-vt6zi 2 жыл бұрын
thank you..
@NinjaCoders
@NinjaCoders 3 жыл бұрын
thank you bhai
@gauravdewangan1460
@gauravdewangan1460 2 жыл бұрын
Thanks man. Good tutorial but also add comments in code for beginners
@Ibrahimkhalil-hw4hd
@Ibrahimkhalil-hw4hd 2 жыл бұрын
Thank you bro. You are amazing
@vincenzocristiano135
@vincenzocristiano135 2 жыл бұрын
thanks legend!
@edoBianchi
@edoBianchi 2 жыл бұрын
good.thx
@Jamesis07
@Jamesis07 3 жыл бұрын
Thank you very much you are perfect
@princeyadav4294
@princeyadav4294 2 жыл бұрын
great
@kikiriki2024
@kikiriki2024 3 жыл бұрын
Gracias
@AdairAconzs
@AdairAconzs 3 жыл бұрын
Nice
@grinders2000
@grinders2000 2 жыл бұрын
THANK U
@xaxa730
@xaxa730 5 жыл бұрын
What if I applied a delay to the input to turn blue only when the white circle touched the other end? 🤔
@vijaygohil4685
@vijaygohil4685 6 жыл бұрын
You have created the videos is very best or superb but I request that enter voice in your video and explain case property SVG
@OnlineTutorialsYT
@OnlineTutorialsYT 6 жыл бұрын
+Vijay Gohil ok
@rainchai851
@rainchai851 4 жыл бұрын
i prefer this song
@emanueldiazmx
@emanueldiazmx 6 жыл бұрын
Wow thank you so much, its so nice and easy to code. Really awesome!
@user-sh4jl3hz2w
@user-sh4jl3hz2w 2 жыл бұрын
i wanna steal your skills
@amine_ers
@amine_ers 4 жыл бұрын
Thaaanks
@DeshanUdupihilla
@DeshanUdupihilla 3 жыл бұрын
a perfect video. thank you very much! ♥️
@CoderDmitri
@CoderDmitri 3 жыл бұрын
ty
@The_EpicVoice
@The_EpicVoice 6 жыл бұрын
that's fantastic keep going!! if u add ur voice it would be better
@justb3m184
@justb3m184 3 жыл бұрын
Salute!
@aliabukahil
@aliabukahil 3 жыл бұрын
Absolutely appreciated
@martinflores9611
@martinflores9611 5 жыл бұрын
your video It helped me a lot
@nomanabid9394
@nomanabid9394 4 жыл бұрын
You're the BEST
@alonsogza2890
@alonsogza2890 6 жыл бұрын
Muchas Gracias, Excelente ejemplo
@tonnichowdhury7356
@tonnichowdhury7356 4 жыл бұрын
thanksssss aaa trillion
@Peter_Gamerrr
@Peter_Gamerrr 4 жыл бұрын
you should use :: for pseudo elements instead of using : because that's for pseudo classes pls I know just a single one works to make sure its backwards compatible but it's not the default for css3
@deepaksarvepalli2344
@deepaksarvepalli2344 3 жыл бұрын
I couldn't able to change width and Height with differente pixels.... Means it took only same value for the dimensions... Like square.... Please help me to fix this...
@Error-zs1yn
@Error-zs1yn 3 жыл бұрын
thank you so much
@cypherk
@cypherk 4 жыл бұрын
Doesn't quite work for me. the `::before` elements slides, alright, but there's also a circle left behind where it used to be in the unchecked state but half-hidden behind the checkbox background.
@reallygood7580
@reallygood7580 4 жыл бұрын
im not sure that it will work, but try "z-index: 1;"
@emcasaempreendimentosimobi3229
@emcasaempreendimentosimobi3229 3 жыл бұрын
Perfect . Thank you
@ProMakerDev
@ProMakerDev 4 жыл бұрын
thank you very much, such a great help
@christianromero6815
@christianromero6815 Жыл бұрын
How to do this with input{ all: unset;} in reset stylesheet???
@satyabratasahoo8665
@satyabratasahoo8665 4 жыл бұрын
Very nice 👌
@bobsuk777
@bobsuk777 7 жыл бұрын
God stuff, but, in input[type='checkbox'] css declaration, must be added -moz-apearance:none; for firefox compatibility
@ewenlbh
@ewenlbh 6 жыл бұрын
Bob Suk yeah and a display:none on the checkbox element would be way better
@reallygood7580
@reallygood7580 4 жыл бұрын
@@ewenlbh TRUE
@miriaandressa2734
@miriaandressa2734 3 жыл бұрын
Nice, thanks
@micromanBD
@micromanBD 6 жыл бұрын
So many thanks for sharing it.
@jaspreethayer2275
@jaspreethayer2275 5 жыл бұрын
Amazing
@luiza4142
@luiza4142 7 жыл бұрын
You save me again thx bro
@AruljothySundramoorthy
@AruljothySundramoorthy 4 жыл бұрын
Awesome Man
@guylemay1471
@guylemay1471 5 жыл бұрын
Yeah... this is more like it! It is good enough that it would probably make a JS Guru noticed your Kung Fu?
@PramitBiswas
@PramitBiswas 6 жыл бұрын
How to add dragging and snapping functionality along with click with js and css only?
@wilsommontec390
@wilsommontec390 5 жыл бұрын
Me sirvio su video gracias
@edwingarcia5043
@edwingarcia5043 5 жыл бұрын
Awesome bro
@syediqbalahmed3176
@syediqbalahmed3176 5 жыл бұрын
*_good_*
@alexkotusenko302
@alexkotusenko302 6 жыл бұрын
NICE!!!!!!!!!!!!!!!!!!!!!! LIKE!!!!!!!!!!!!!!!!!!!!!!
@krmnPareDes
@krmnPareDes 3 жыл бұрын
fx
@hvxun9924
@hvxun9924 3 жыл бұрын
amazinggggggggggg
@tsnode4098
@tsnode4098 5 жыл бұрын
thaks for this
@carlosgaleanohn
@carlosgaleanohn 7 жыл бұрын
Great job!!!
@akshaybedared
@akshaybedared 4 жыл бұрын
Thank you :)
@maazsiddiqui6324
@maazsiddiqui6324 4 жыл бұрын
my button which is scaled gets small when its checked and when cheked it scales(1.1)! solution?
@end-me-please
@end-me-please 2 жыл бұрын
what is the background music?
@ck0024
@ck0024 5 жыл бұрын
*Cool*
@виртуоз_ру
@виртуоз_ру 7 жыл бұрын
Красавчик
@user-bl2ij3be4c
@user-bl2ij3be4c 4 жыл бұрын
Thanks. By the way, I like classical music, but that was tooooooooooooooo schmaltzy.
@michelventura3882
@michelventura3882 4 жыл бұрын
thaaaaanks !
@venturevpn
@venturevpn 6 жыл бұрын
Send us , movie , you create app APK responsive scroll menu . Congratulations to you big developer congratulations to you
@SSCAT0
@SSCAT0 4 жыл бұрын
i don't know how make circle in center. in Microsoft Edge not work (
@s.agamerz7962
@s.agamerz7962 3 жыл бұрын
Make a game using python or java
@douglaslisboa9
@douglaslisboa9 5 жыл бұрын
Muito bom, parabéns \o/
@mikebags6653
@mikebags6653 6 жыл бұрын
it doesn't work in other browsers. it only works in chrome. can you help me?
@ChrisAdams-fc2mn
@ChrisAdams-fc2mn 6 жыл бұрын
If I put this code in my CSS will it not affect every checkbox on my website?
@julioalvarado1833
@julioalvarado1833 3 жыл бұрын
Si
@Seyfettin0
@Seyfettin0 5 жыл бұрын
Hey please add the codes on descriptions .
@luiza4142
@luiza4142 7 жыл бұрын
How to style a radio button??
@mdshabaz2591
@mdshabaz2591 4 жыл бұрын
instead of music u can explain the code too
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 9 ай бұрын
NADEEMJOHN
@taranagnew436
@taranagnew436 4 жыл бұрын
i've tried everything and i just get a square check-box and not wat you have, plz help
@eccehomer8182
@eccehomer8182 4 жыл бұрын
Make sure your code is absolutely the same - every character, every space. If it doesn't work then post your code here in a reply.
@taranagnew436
@taranagnew436 4 жыл бұрын
HTML: Style Checkbox with CSS CSS: body{ margin: 0; padding: 0; background: #f3f3f3;} .center{ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);} } input[type="checkbox"] { position: relative; width: 80px; height: 40px; -webkit-appearance: none; background: #c6c6c6; outline: none; border-radius: 20px; box-shadow: inset 0 0 5px rgba(255, 0, 0, 0.2); /*transition: .5s;*/ } input:checked[type="checkbox"] { background: #03a9f4; } input[type="checkbox"]:before { content: ''; position: absolute; width: 40px; height: 40px; border-radius: 20px; top: 0; left: 0; background: #0400ff; transform: scale(1.1); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); transition: .5s; } input:checked[type="checkbox"]:before { left:40px; }
@deepakgurung309
@deepakgurung309 6 жыл бұрын
input[type="checkbox'] is not working for firefox
@CyanLuk
@CyanLuk 5 жыл бұрын
no me funciona lo copie tal cual lo vi en us video y no me hace las transiciones correctamente. no tube ningun error al copiarlo. que esta pasando?
@controlccontrolv4519
@controlccontrolv4519 5 жыл бұрын
Hey I'II can to replay your code in my language on my channel?
@link2web658
@link2web658 5 жыл бұрын
dear sir Mujhe apni youtube play list ko apne php/html page per list karna or wo play kar per popup ho automatically update ho uvaaworld.com/gallery_backup.php ye website ka link hai kuch is traha se plz code ya video ka link send kijiye
@skentertainment337
@skentertainment337 5 жыл бұрын
Bakwas video
@letsfly662
@letsfly662 3 жыл бұрын
What should do if you have multiple checkboxes but you only want one to be like this? i.e. how do you make a checkbox unique?
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 9 ай бұрын
NADEEMJOHN
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 9 ай бұрын
NADEEMJOHN
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 9 ай бұрын
NADEEMJOHN
Стилизация checkbox и radio
31:30
От 0 до 1
Рет қаралды 24 М.
مسبح السرير #قصير
00:19
سكتشات وحركات
Рет қаралды 3,1 МЛН
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 11 МЛН
Blue Food VS Red Food Emoji Mukbang
00:33
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 24 МЛН
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 12 МЛН
Award Winning Animation With Only 20 Lines Of CSS?
6:59
Hyperplexed
Рет қаралды 1,7 МЛН
CSS Custom Checkbox List Design | Html CSS
7:04
Online Tutorials
Рет қаралды 23 М.
Make Awesome SVG Animations with CSS // 7 Useful Techniques
12:20
Кастомные радио кнопки на HTML и CSS. Подробный урок от ВебКадеми
19:15
ВебКадеми | Юрий Ключевский
Рет қаралды 12 М.
Custom Checkbox Tutorial
14:48
Web Dev Simplified
Рет қаралды 38 М.
You Don't Need JavaScript For This - CSS ONLY Infinite Scroll
23:35
Slaying The Dragon
Рет қаралды 100 М.
CSS Tips And Tricks I Wish I Knew Before
12:12
Lama Dev
Рет қаралды 470 М.
Чекбокс в виде переключателя (Switch toggle) HTML + CSS
19:08
Александр Дудукало
Рет қаралды 4,5 М.
The New dialog HTML Element Changes Modals Forever
12:09
Web Dev Simplified
Рет қаралды 585 М.
مسبح السرير #قصير
00:19
سكتشات وحركات
Рет қаралды 3,1 МЛН