How to make custom radio buttons animated with delay cool effect on mouse hover in pure css without JQuery/Javascript | Create dynamic css animation on radio button hover effect with tick mark checked delay animation effect without Javascript/jquery in html

1,769 views

Hey guys, today in this post we are going to learn about How to make custom radio buttons animated with delay cool effect on mouse hover in pure css without JQuery/Javascript in HTML.

Radio buttons are normally presented in radio groups (a collection of radio buttons describing a set of related options). Only one radio button in a group can be selected at the same time.

Note: The radio group must have share the same name (the value of the name attribute) to be treated as a group. Once the radio group is created, selecting any radio button in that group automatically deselects any other selected radio button in the same group. You can have as many radio groups on a page as you want, as long as each group has its own name. To Know more details about radio buttons, Click Here..

Challenges in your career

🎯 If You Are Facing Any Of These 6 Challenges in your career.

  • Learn Salesforce Development
  • Career Confusion
  • No Interview Call
  • Low Salary
  • No Promotion/Growth
  • No Finding New Job Opportunity
  • Why you stucking from past so many years in same company?

 

 

 

Final Output β†’

custom css animation radio button -- w3web.net

 

You can download file directly from github by Click Here.

 

Other related post that would you like to learn in Salesforce

 

  • Find the below steps β–Ύ

 

Create HTML File β†’

Step 1:- Create HTML File : radioButtonTickMarkCSS.html


  1.   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Radio button with tick mark css</title>
  6. <STYLE TYPE="text/css">
  7. .radioOver ul{
  8. padding: 0;
  9. overflow: auto;
  10. list-style: none;
  11. margin: 0;
  12.  
  13. }
  14.  
  15. .radioOver ul li{
  16. position: relative;
  17. float: left;
  18. width: 100%;
  19. height: 100px;
  20. color: #ccc;
  21. display: block;
  22. }
  23.  
  24. .radioOver ul li input[type=radio]{
  25. position: absolute;
  26. visibility: hidden;
  27. }
  28.  
  29. .radioOver ul li label{
  30. font-size: 25px;
  31. padding: 25px 25px 25px 80px;
  32. margin: 10px auto;
  33. height: 30px;
  34. z-index: 9;
  35. display: block;
  36. position: relative;
  37. font-weight: 300;
  38.  
  39. cursor: pointer;
  40. -webkit-transition: all 0.25s linear;
  41. }
  42.  
  43. .radioOver ul li:hover label{
  44. color: #000;
  45. }
  46.  
  47. .radioOver ul li .check{
  48. border-radius: 100%;
  49. height: 25px;
  50. width: 25px;
  51. top: 30px;
  52. left: 20px;
  53. z-index: 5;
  54. display: block;
  55. position: absolute;
  56. border: 5px solid #000;
  57. transition: border .25s linear;
  58. -webkit-transition: border .25s linear;
  59. }
  60.  
  61. .radioOver ul li:hover .check {
  62. border: 5px solid #ff8000;
  63. }
  64.  
  65. .radioOver ul li .check::before {
  66. border-radius: 100%;
  67. height: 15px;
  68. width: 15px;
  69. top: 5px;
  70. left: 5px;
  71. display: block;
  72. position: absolute;
  73. content: '';
  74. margin: auto;
  75. transition: background 0.25s linear;
  76. -webkit-transition: background 0.25s linear;
  77. }
  78.  
  79. .radioOver input[type=radio]:checked ~ .check {
  80. border: 5px solid #00ff00;
  81. }
  82.  
  83. .radioOver input[type=radio]:checked ~ .check::before{
  84. background: #ff00ff;
  85. }
  86.  
  87. .radioOver input[type=radio]:checked ~ label{
  88. color: #ff00ff;
  89. }
  90.  
  91.  
  92.  
  93.  
  94. </STYLE>
  95. </head>
  96.  
  97. <body>
  98. <table width="100%" border="1" cellspacing="0" cellpadding="10" bordercolor="#ddd" style="border-collapse:collapse; font-family:Arial, Helvetica, sans-serif;"">
  99.   <caption>
  100.     <h2 style="color:#ff8000; font-family:Arial, Helvetica, sans-serif;">Radio button with tick mark css animation</h2>
  101.   </caption>
  102.   <tr>
  103.     <td style="width:50%; vertical-align:top;">
  104.     <div class="radioOver">
  105.     <ul>
  106.  
  107. <li>
  108. <input type="radio" id="SalesforceLWC" name="selector">
  109. <label for="SalesforceLWC">Salesforce LWC</label>
  110.  
  111. <div class="check"></div>
  112. </li>
  113.  
  114. <li>
  115. <input type="radio" id="AuraComponent" name="selector">
  116. <label for="AuraComponent">Aura Component</label>
  117.  
  118. <div class="check"><div class="inside"></div></div>
  119. </li>
  120.  
  121. <li>
  122. <input type="radio" id="Visualforce" name="selector">
  123. <label for="Visualforce">Visualforce</label>
  124.  
  125. <div class="check"><div class="inside"></div></div>
  126. </li>
  127.  
  128. </ul>
  129. </div>
  130. </td>
  131.     <td style="width:50%; vertical-align:top;">
  132.         <div class="radioOver">
  133.     <ul>
  134.  
  135. <li>
  136. <input type="radio" id="SalesforceTutorial" name="selector">
  137. <label for="SalesforceTutorial">Salesforce Tutorial W3web.net</label>
  138.  
  139. <div class="check"></div>
  140. </li>
  141.  
  142. <li>
  143. <input type="radio" id="SalesforceIntegration" name="selector">
  144. <label for="SalesforceIntegration">Salesforce Integration</label>
  145.  
  146. <div class="check"><div class="inside"></div></div>
  147. </li>
  148.  
  149. <li>
  150. <input type="radio" id="SalesforceTrigger" name="selector">
  151. <label for="SalesforceTrigger">Salesforce Trigger</label>
  152.  
  153. <div class="check"><div class="inside"></div></div>
  154. </li>
  155.  
  156. </ul>
  157. </div>
  158.     </td>
  159.   </tr>
  160.  
  161. </table>
  162.  
  163. <br/><br/>
  164.    <!--Start RelatedTopics Section-->
  165. <div style="border:1px #ddd solid; padding:10px; background:#eee; margin:40px 0; overflow:hidden; clear:both;">
  166.  
  167.             <p data-aura-rendered-by="435:0"><img src="https://www.w3web.net/wp-content/uploads/2021/05/thumbsUpLike.png" width="25" height="25" style="vertical-align:top; margin-right:10px;" data-aura-rendered-by="436:0"><strong data-aura-rendered-by="437:0"><span style="font-size:16px; font-style:italic; display:inline-block; margin-right:5px;">Don't forget to check out:-</span><a href="https://www.w3web.net/" target="_blank" rel="noopener noreferrer" style="text-decoration:none;" data-aura-rendered-by="440:0">An easy way to learn step-by-step online free Salesforce tutorial, To know more Click  <span style="color:#ff8000; font-size:18px;" data-aura-rendered-by="442:0">Here..</span></a></strong></p>
  168.  
  169.             <br/><br/>
  170.             <p data-aura-rendered-by="435:0"><img src="https://www.w3web.net/wp-content/uploads/2021/07/tickMarkIcon.png" width="25" height="25" style="vertical-align:top; margin-right:10px;" data-aura-rendered-by="436:0"><strong data-aura-rendered-by="437:0"><span style="font-size:17px; font-style:italic; display:inline-block; margin-right:5px; color:rgb(255 128 0);">You May Also Like β†’</span> </strong></p>
  171.             <div style="display:block; overflow:hidden;"> 
  172.                 <div style="width: 50%; float:left; display:inline-block">
  173.                     <ul style="list-style-type: square; font-size: 16px; margin: 0 0 0 54px; padding: 0;"> 
  174.                         <li><a href="https://www.w3web.net/lwc-get-set-lightning-checkbox-value/" target="_blank" rel="noopener noreferrer">How to get selected checkbox value in lwc</a></li>
  175.                         <li><a href="https://www.w3web.net/display-account-related-contacts-in-lwc/" target="_blank" rel="noopener noreferrer">how to display account related contacts based on AccountId in lwc</a></li>
  176.                         <li><a href="https://www.w3web.net/create-lightning-datatable-row-actions-in-lwc/" target="_blank" rel="noopener noreferrer">how to create lightning datatable row actions in lwc</a></li>
  177.                         <li><a href="https://www.w3web.net/if-and-else-condition-in-lwc/" target="_blank" rel="noopener noreferrer">how to use if and else condition in lwc</a></li>
  178.                         <li><a href="https://www.w3web.net/get-selected-radio-button-value-and-checked-default-in-lwc/" target="_blank" rel="noopener noreferrer">how to display selected radio button value in lwc</a></li>
  179.                     </ul>
  180.             </div>
  181.  
  182.             <div style="width: 50%; float:left; display:inline-block">
  183.                     <ul style="list-style-type: square; font-size: 16px; margin: 0 0 0 54px; padding: 0;"> 
  184.                         <li><a href="https://www.w3web.net/display-account-related-contacts-lwc/" target="_blank" rel="noopener noreferrer">display account related contacts based on account name in lwc</a></li>
  185.                         <li><a href="https://www.w3web.net/create-lightning-datatable-row-actions-in-lwc/" target="_blank" rel="noopener noreferrer">how to insert a record of account Using apex class in LWC</a></li>
  186.                         <li><a href="https://www.w3web.net/fetch-picklist-values-dynamic-in-lwc/" target="_blank" rel="noopener noreferrer">how to get picklist values dynamically in lwc</a></li>
  187.                         <li><a href="https://www.w3web.net/edit-save-and-remove-rows-dynamically-in-lightning-component/" target="_blank" rel="noopener noreferrer">how to edit/save row dynamically in lightning component</a></li>
  188.                         <li><a href="https://www.w3web.net/update-parent-object-from-child/" target="_blank" rel="noopener noreferrer">update parent field from child using apex trigger</a></li>
  189.                     </ul>
  190.                 </div>
  191.                <div style="clear:both;"></div> 
  192.                <br/>
  193.                 <div class="youtubeIcon">
  194.                     <a href="https://www.youtube.com/channel/UCW62gTen2zniILj9xE6LmOg" target="_blank" rel="noopener noreferrer"><img src="https://www.w3web.net/wp-content/uploads/2021/11/youtubeIcon.png" width="25" height="25" style="vertical-align:top; margin-right:10px;"/> <strong>TechW3web:-</strong> To know more, Use this <span style="color: #ff8000; font-weight: bold;">Link</span> </a>
  195.                 </div>
  196.     </div>
  197.  
  198. </div>
  199.  
  200.   <!--End RelatedTopics Section-->
  201. </body>
  202. </html>

 
custom css animation radio button -- w3web.net
 
 

Further post that would you like to learn in Salesforce

 

 

 

FAQ (Frequently Asked Questions)

How do you style radio buttons as buttons?

The way to do it is to use 'label' elements with properly set for attributes, then hide the radio button itself using visibility: hidden rather than display: none . You can then position the labels wherever you want and they will act as radio buttons.

Can you style an HTML radio button to look like a checkbox?

Yes it can be done using this css, i've hidden the default radio button and made a custom radio button that looks like a checkbox.

What does a radio button look like?

A radio button should be a small circle that has a solid circle inside it when selected. Visually present groups of choices as groups, and clearly separate them from other groups on the same page.

Related Topics | You May Also Like

 
  

Our Free Courses β†’

πŸ‘‰ Get Free Course β†’

πŸ“Œ Salesforce Administrators

πŸ“Œ Salesforce Lightning Flow Builder

πŸ“Œ Salesforce Record Trigger Flow Builder

πŸ‘‰ Get Free Course β†’

πŸ“Œ Aura Lightning Framework

πŸ“Œ Lightning Web Component (LWC)

πŸ“Œ Rest APIs Integration




Hi, This is Vijay Kumar behind the admin and founder of w3web.net. I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time. [Read full bio] | | The Sitemap where you can find all published post on w3web.net

Leave a Comment