{"id":1397,"date":"2023-05-06T20:19:00","date_gmt":"2023-05-06T17:19:00","guid":{"rendered":"https:\/\/notes.profidev.online\/?p=1397"},"modified":"2023-05-06T13:23:00","modified_gmt":"2023-05-06T10:23:00","slug":"radio-select","status":"publish","type":"post","link":"https:\/\/notes.profidev.online\/ru\/switch\/1397\/","title":{"rendered":"Radio select"},"content":{"rendered":"\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"914\" height=\"507\" src=\"https:\/\/notes.profidev.online\/wp-content\/uploads\/2023\/05\/peek-2023-05-06-12-20.gif\" alt=\"Radio select\" class=\"wp-image-1398 size-full\"\/><\/figure><div class=\"wp-block-media-text__content\">\n<p class=\"wp-block-paragraph\"><\/p>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;htmlmixed&quot;,&quot;mime&quot;:&quot;text\/html&quot;,&quot;theme&quot;:&quot;cobalt&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;HTML&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;html&quot;}\"> &lt;h1&gt;Select one:&lt;\/h1&gt;\n  &lt;div id=&quot;radios&quot;&gt;\n    &lt;label for=&quot;input1&quot;&gt;&lt;\/label&gt;\n    &lt;input  id=&quot;input1&quot; name=&quot;radio&quot; type=&quot;radio&quot; \/&gt;\n    &lt;label for=&quot;input2&quot;&gt;&lt;\/label&gt;\n    &lt;input  id=&quot;input2&quot; name=&quot;radio&quot; type=&quot;radio&quot; \/&gt;\n    &lt;label for=&quot;input3&quot;&gt;&lt;\/label&gt;\n    &lt;input  id=&quot;input3&quot; name=&quot;radio&quot; type=&quot;radio&quot; \/&gt;\n    &lt;label for=&quot;input4&quot;&gt;&lt;\/label&gt;\n    &lt;input  id=&quot;input4&quot; name=&quot;radio&quot; type=&quot;radio&quot; \/&gt;\n    &lt;label for=&quot;input5&quot;&gt;&lt;\/label&gt;\n    &lt;input  id=&quot;input5&quot; name=&quot;radio&quot; type=&quot;radio&quot; \/&gt;\n    &lt;span id=&quot;slider&quot;&gt;&lt;\/span&gt;\n  &lt;\/div&gt;<\/pre><\/div>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;css&quot;,&quot;mime&quot;:&quot;text\/css&quot;,&quot;theme&quot;:&quot;cobalt&quot;,&quot;lineNumbers&quot;:true,&quot;styleActiveLine&quot;:true,&quot;lineWrapping&quot;:true,&quot;readOnly&quot;:false,&quot;fileName&quot;:&quot;&quot;,&quot;TrpContentRestriction&quot;:{&quot;restriction_type&quot;:&quot;exclude&quot;,&quot;selected_languages&quot;:[],&quot;panel_open&quot;:true},&quot;language&quot;:&quot;CSS&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;css&quot;}\">*{margin:0;padding:0;box-sizing:border-box;}\nbody{background:teal;color:#fff;padding-bottom:10%;}\nh1{text-align:center;margin:20% 0 5%;font-family:verdana;font-weight:100;}\n#radios{\n  position:relative;\n  width:50%;\n  margin:0 auto;\n}\ninput[type=&quot;radio&quot;]{\n  position:absolute;\n  right:1000%;\n}\nlabel{\n  float:left;\n  width:15%; padding-bottom:15%;\n  margin:0 2.5%;\n  background:rgba(255,255,255,.2);\n  border-radius:50%;\n  cursor:pointer;\n}\n#slider{\n  position:absolute;\n  left:0%; top:0;\n  width:10%; padding-bottom:10%;\n  margin:2.5% 0 0 5%;\n  background:#fff;\n  transition:transform 1s;\n  border-radius:50%;\n  animation-timing-function: ease-in-out;\n  animation-duration:.3s;\n  animation-fill-mode: forwards;\n  transition: 0.2s left .05s ease-in-out;\n}\n#input1:checked  ~ #slider{ animation-name: input1; left:0; }\n#input2:checked  ~ #slider{ animation-name: input2; left:20%; }\n#input3:checked  ~ #slider{ animation-name: input3; left:40%; }\n#input4:checked  ~ #slider{ animation-name: input4; left:60%; }\n#input5:checked  ~ #slider{ animation-name: input5; left:80%; }\n\n@keyframes input1{ 30%, 70% { transform:scale(0.5); } }\n@keyframes input2{ 30%, 70% { transform:scale(0.5); } }\n@keyframes input3{ 30%, 70% { transform:scale(0.5); } }\n@keyframes input4{ 30%, 70% { transform:scale(0.5); } }\n@keyframes input5{ 30%, 70% { transform:scale(0.5); } }<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1398,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[16],"class_list":["post-1397","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-switch","tag-htmlcss"],"_links":{"self":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/comments?post=1397"}],"version-history":[{"count":1,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1397\/revisions"}],"predecessor-version":[{"id":1399,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1397\/revisions\/1399"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media\/1398"}],"wp:attachment":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media?parent=1397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/categories?post=1397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/tags?post=1397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}