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

  Переглядів 133,110

Online Tutorials

Online Tutorials

6 років тому

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

КОМЕНТАРІ: 110
@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!!!
@Edthewebsurfer
@Edthewebsurfer 4 роки тому
Simple and to the point, thank you for uploading.
@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 3 роки тому
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.
@DcodeShow
@DcodeShow 4 роки тому
Wow, you are the man, this is an incredible use of inputs. Thank you for sharing.
@eypbal
@eypbal 6 років тому
This is so perfect. Thanksssss
@zholy9
@zholy9 5 років тому
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 ...
@alonsogza2890
@alonsogza2890 6 років тому
Muchas Gracias, Excelente ejemplo
@nicolaszarate2439
@nicolaszarate2439 2 роки тому
Thanks a lot. This tutorial was so helpful for a project.
@luiza4142
@luiza4142 6 років тому
You save me again thx bro
@The_EpicVoice
@The_EpicVoice 6 років тому
that's fantastic keep going!! if u add ur voice it would be better
@emanueldiazmx
@emanueldiazmx 6 років тому
Wow thank you so much, its so nice and easy to code. Really awesome!
@DeshanUdupihilla
@DeshanUdupihilla 3 роки тому
a perfect video. thank you very much! ♥️
@revanth9272
@revanth9272 3 роки тому
I learnt a lot from you👍.
@RenardBergson
@RenardBergson Рік тому
Thank you! You're the best css player hehe
@martinflores9611
@martinflores9611 5 років тому
your video It helped me a lot
@xaxa730
@xaxa730 5 років тому
What if I applied a delay to the input to turn blue only when the white circle touched the other end? 🤔
@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!!!
@nomanabid9394
@nomanabid9394 4 роки тому
You're the BEST
@emcasaempreendimentosimobi3229
@emcasaempreendimentosimobi3229 3 роки тому
Perfect . Thank you
@ProMakerDev
@ProMakerDev 4 роки тому
thank you very much, such a great help
@micromanBD
@micromanBD 5 років тому
So many thanks for sharing it.
@aliabukahil
@aliabukahil 3 роки тому
Absolutely appreciated
@Ibrahimkhalil-hw4hd
@Ibrahimkhalil-hw4hd 2 роки тому
Thank you bro. You are amazing
@reallygood7580
@reallygood7580 3 роки тому
Win + Tab. Nice...
@cagb80
@cagb80 6 років тому
Great job!!!
@gyros9162
@gyros9162 Рік тому
this is cool and beautiful
@douglaslisboa9
@douglaslisboa9 5 років тому
Muito bom, parabéns \o/
@PramitBiswas
@PramitBiswas 5 років тому
How to add dragging and snapping functionality along with click with js and css only?
@Jamesis07
@Jamesis07 3 роки тому
Thank you very much you are perfect
@jaspreethayer2275
@jaspreethayer2275 5 років тому
Amazing
@Computers_Tips_and_Trick
@Computers_Tips_and_Trick 2 місяці тому
Thank you very much this help me lot
@ldawg214
@ldawg214 6 років тому
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
@edwingarcia5043
@edwingarcia5043 5 років тому
Awesome bro
@wilsommontec390
@wilsommontec390 5 років тому
Me sirvio su video gracias
@AruljothySundramoorthy
@AruljothySundramoorthy 4 роки тому
Awesome Man
@vincenzocristiano135
@vincenzocristiano135 Рік тому
thanks legend!
@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
@akshaybedared
@akshaybedared 4 роки тому
Thank you :)
@tsnode4098
@tsnode4098 5 років тому
thaks for this
@gauravdewangan1460
@gauravdewangan1460 2 роки тому
Thanks man. Good tutorial but also add comments in code for beginners
@Error-zs1yn
@Error-zs1yn 3 роки тому
thank you so much
@virtuoz-ru
@virtuoz-ru 6 років тому
Красавчик
@satyabratasahoo8665
@satyabratasahoo8665 4 роки тому
Very nice 👌
@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
@sujandrn6186
@sujandrn6186 4 роки тому
i really love it......
@OnlineTutorialsYT
@OnlineTutorialsYT 4 роки тому
Great
@miriaandressa2734
@miriaandressa2734 2 роки тому
Nice, thanks
@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?
@amine_ers
@amine_ers 4 роки тому
Thaaanks
@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
@emre-vt6zi
@emre-vt6zi 2 роки тому
thank you..
@NinjaCoders
@NinjaCoders 3 роки тому
thank you bhai
@ismotarasrity4696
@ismotarasrity4696 4 роки тому
Thanks
@michelventura3882
@michelventura3882 4 роки тому
thaaaaanks !
@justb3m184
@justb3m184 2 роки тому
Salute!
@maazsiddiqui6324
@maazsiddiqui6324 3 роки тому
my button which is scaled gets small when its checked and when cheked it scales(1.1)! solution?
@tonnichowdhury7356
@tonnichowdhury7356 3 роки тому
thanksssss aaa trillion
@edoBianchi
@edoBianchi 2 роки тому
good.thx
@ck0024
@ck0024 5 років тому
*Cool*
@AdairAconzs
@AdairAconzs 3 роки тому
Nice
@grinders2000
@grinders2000 Рік тому
THANK U
@luiza4142
@luiza4142 6 років тому
How to style a radio button??
@christianromero6815
@christianromero6815 Рік тому
How to do this with input{ all: unset;} in reset stylesheet???
@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...
@alexkotusenko302
@alexkotusenko302 6 років тому
NICE!!!!!!!!!!!!!!!!!!!!!! LIKE!!!!!!!!!!!!!!!!!!!!!!
@krmnPareDes
@krmnPareDes 3 роки тому
fx
@hvxun9924
@hvxun9924 3 роки тому
amazinggggggggggg
@kikiriki2024
@kikiriki2024 3 роки тому
Gracias
@princeyadav4294
@princeyadav4294 2 роки тому
great
@syediqbalahmed3176
@syediqbalahmed3176 4 роки тому
*_good_*
@user-sh4jl3hz2w
@user-sh4jl3hz2w Рік тому
i wanna steal your skills
@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 3 роки тому
im not sure that it will work, but try "z-index: 1;"
@iliasselaissi3890
@iliasselaissi3890 2 роки тому
this is the easy way to do it
@mikebags6653
@mikebags6653 5 років тому
it doesn't work in other browsers. it only works in chrome. can you help me?
@SSCAT0
@SSCAT0 4 роки тому
i don't know how make circle in center. in Microsoft Edge not work (
@CoderDmitri
@CoderDmitri 3 роки тому
ty
@end-me-please
@end-me-please Рік тому
what is the background music?
@Seyfettin0
@Seyfettin0 5 років тому
Hey please add the codes on descriptions .
@controlccontrolv4519
@controlccontrolv4519 5 років тому
Hey I'II can to replay your code in my language on my channel?
@rainchai851
@rainchai851 4 роки тому
i prefer this song
@user-bl2ij3be4c
@user-bl2ij3be4c 4 роки тому
Thanks. By the way, I like classical music, but that was tooooooooooooooo schmaltzy.
@SEMANCIEDADE
@SEMANCIEDADE 5 років тому
Send us , movie , you create app APK responsive scroll menu . Congratulations to you big developer congratulations to you
@bobsuk777
@bobsuk777 6 років тому
God stuff, but, in input[type='checkbox'] css declaration, must be added -moz-apearance:none; for firefox compatibility
@ewenlbh
@ewenlbh 5 років тому
Bob Suk yeah and a display:none on the checkbox element would be way better
@reallygood7580
@reallygood7580 3 роки тому
@@ewenlbh TRUE
@ChrisAdams-fc2mn
@ChrisAdams-fc2mn 5 років тому
If I put this code in my CSS will it not affect every checkbox on my website?
@julioalvarado1833
@julioalvarado1833 3 роки тому
Si
@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; }
@s.agamerz7962
@s.agamerz7962 3 роки тому
Make a game using python or java
@mdshabaz2591
@mdshabaz2591 4 роки тому
instead of music u can explain the code too
@deepakgurung309
@deepakgurung309 5 років тому
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?
@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
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 5 місяців тому
NADEEMJOHN
@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 5 місяців тому
NADEEMJOHN
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 5 місяців тому
NADEEMJOHN
@NadeemJohn-xu4lu
@NadeemJohn-xu4lu 5 місяців тому
NADEEMJOHN
Excited Dog Zooms In and Out of Sliding Door!
00:18
The Pet Collective
Переглядів 16 млн
Vasiliy Lomachenko vs George Kambosos | INTERNATIONAL LIVE STREAM
3:10:05
Top Rank Boxing
Переглядів 1,1 млн
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Переглядів 33 млн
CSS Custom Radio Button UI Design | Remake
8:03
Online Tutorials
Переглядів 27 тис.
CSS Custom Checkbox | Day Night Mode
3:57
Online Tutorials
Переглядів 143 тис.
CSS Tips And Tricks I Wish I Knew Before
12:12
Lama Dev
Переглядів 395 тис.
CSS Custom Checkbox List Design | Html CSS
7:04
Online Tutorials
Переглядів 22 тис.
CSS Custom Checkbox Design
4:54
Online Tutorials
Переглядів 31 тис.
CSS Custom Checkbox Design | Html CSS Tutorial @OnlineTutorialsYT
8:02
Online Tutorials
Переглядів 47 тис.
Learn Flexbox CSS in 8 minutes
8:16
Slaying The Dragon
Переглядів 1,3 млн
Buttons With Awesome Hover Effects Using Only HTML & CSS
5:48
DarkCode
Переглядів 846 тис.