Svg自定义美化复选框开关切换动画特效代码

4款简单美观的css3 svg自定义美化复选框开关切换动画特效,css3开关按钮切换代码。

使用方法在页面引用以下HTML代码

1234567891011121314151617181920212223242526272829
<div class="wrapper"> <div class="switch_box box_1"> <input type="checkbox" class="switch_1"> </div> <div class="switch_box box_2"> <input type="checkbox" class="switch_2"> </div> <div class="switch_box box_3"> <div class="toggle_switch"> <input type="checkbox" class="switch_3"> <svg class="checkbox" xmlns="http://www.w3.org/2000/svg" style="isolation:isolate" viewBox="0 0 168 80"> <path class="outer-ring" d="M41.534 9h88.932c17.51 0 31.724 13.658 31.724 30.482 0 16.823-14.215 30.48-31.724 30.48H41.534c-17.51 0-31.724-13.657-31.724-30.48C9.81 22.658 24.025 9 41.534 9z" fill="none" stroke="#233043" stroke-width="3" stroke-linecap="square" stroke-miterlimit="3"/> <path class="is_checked" d="M17 39.482c0-12.694 10.306-23 23-23s23 10.306 23 23-10.306 23-23 23-23-10.306-23-23z"/> <path class="is_unchecked" d="M132.77 22.348c7.705 10.695 5.286 25.617-5.417 33.327-2.567 1.85-5.38 3.116-8.288 3.812 7.977 5.03 18.54 5.024 26.668-.83 10.695-7.706 13.122-22.634 5.418-33.33-5.855-8.127-15.88-11.474-25.04-9.23 2.538 1.582 4.806 3.676 6.66 6.25z"/> </svg> </div> </div> <div class="switch_box box_4"> <div class="input_wrapper"> <input type="checkbox" class="switch_4"> <svg class="is_checked" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 426.67 426.67"> <path d="M153.504 366.84c-8.657 0-17.323-3.303-23.927-9.912L9.914 237.265c-13.218-13.218-13.218-34.645 0-47.863 13.218-13.218 34.645-13.218 47.863 0l95.727 95.727 215.39-215.387c13.218-13.214 34.65-13.218 47.86 0 13.22 13.218 13.22 34.65 0 47.863L177.435 356.928c-6.61 6.605-15.27 9.91-23.932 9.91z"/> </svg> <svg class="is_unchecked" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 212.982 212.982"> <path d="M131.804 106.49l75.936-75.935c6.99-6.99 6.99-18.323 0-25.312-6.99-6.99-18.322-6.99-25.312 0L106.49 81.18 30.555 5.242c-6.99-6.99-18.322-6.99-25.312 0-6.99 6.99-6.99 18.323 0 25.312L81.18 106.49 5.24 182.427c-6.99 6.99-6.99 18.323 0 25.312 6.99 6.99 18.322 6.99 25.312 0L106.49 131.8l75.938 75.937c6.99 6.99 18.322 6.99 25.312 0 6.99-6.99 6.99-18.323 0-25.313l-75.936-75.936z" fill-rule="evenodd" clip-rule="evenodd"/> </svg> </div> </div> </div>

文件信息:

    cambrian.render(\’tail\’)

    复选框(2)开关切换特效(1)

    相关新闻

    Leave a Reply

    Contact Us

    151-1101-0018

    在线咨询:点击这里给我发消息

    邮件:30115776@qq.com

    工作时间:周一至周五,9:30-18:30,节假日休息

    QR code