{"id":1710,"date":"2023-08-25T10:42:31","date_gmt":"2023-08-25T07:42:31","guid":{"rendered":"https:\/\/notes.profidev.online\/?p=1710"},"modified":"2023-08-25T10:42:33","modified_gmt":"2023-08-25T07:42:33","slug":"slider-card","status":"publish","type":"post","link":"https:\/\/notes.profidev.online\/ru\/cards\/1710\/","title":{"rendered":"Slider Card"},"content":{"rendered":"<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Slider Card only HTML \/ CSS\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/OU7gx6qp07E?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\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;div class=&quot;card&quot;&gt;\n  &lt;input type=&quot;radio&quot; name=&quot;select&quot; id=&quot;slide_1&quot; checked&gt;\n  &lt;input type=&quot;radio&quot; name=&quot;select&quot; id=&quot;slide_2&quot;&gt;\n  &lt;input type=&quot;radio&quot; name=&quot;select&quot; id=&quot;slide_3&quot;&gt;\n  &lt;input type=&quot;checkbox&quot; id=&quot;slideImg&quot;&gt;\n\n  &lt;div class=&quot;slider&quot;&gt;\n    &lt;label for=&quot;slide_1&quot; class=&quot;slide slide_1&quot;&gt;&lt;\/label&gt;\n    &lt;label for=&quot;slide_2&quot; class=&quot;slide slide_2&quot;&gt;&lt;\/label&gt;\n    &lt;label for=&quot;slide_3&quot; class=&quot;slide slide_3&quot;&gt;&lt;\/label&gt;\n  &lt;\/div&gt;\n\n  &lt;div class=&quot;inner_part&quot;&gt;\n    &lt;label for=&quot;slideImg&quot; class=&quot;img&quot;&gt;\n      &lt;img class=&quot;img_1&quot; src=&quot;https:\/\/c4.wallpaperflare.com\/wallpaper\/978\/131\/617\/kiz-kulesi-turkey-istanbul-maiden-s-tower-wallpaper-preview.jpg&quot;&gt;\n    &lt;\/label&gt;\n    &lt;div class=&quot;content content_1&quot;&gt;\n      &lt;div class=&quot;title&quot;&gt;\u0130stanbul&lt;\/div&gt;\n      &lt;div class=&quot;text&quot;&gt;\n        Istanbul, a fascinating city built on two Continents, divided by the Bosphorus Strait. This is one of the greatest cities in the world.\n      &lt;\/div&gt;\n      &lt;button&gt;Read More&lt;\/button&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n\n  &lt;div class=&quot;inner_part&quot;&gt;\n    &lt;label for=&quot;slideImg&quot; class=&quot;img&quot;&gt;\n      &lt;img class=&quot;img_2&quot; src=&quot;https:\/\/c4.wallpaperflare.com\/wallpaper\/649\/96\/56\/ankara-cityscape-night-night-sky-wallpaper-preview.jpg&quot;&gt;\n    &lt;\/label&gt;\n    &lt;div class=&quot;content content_2&quot;&gt;\n      &lt;div class=&quot;title&quot;&gt;Ankara&lt;\/div&gt;\n      &lt;div class=&quot;text&quot;&gt;\n        Ankara is Turkey&#039;s beating heart, second largest city, located in the Central Anatolia region and home to the Grand National Assembly of Turkey.\n      &lt;\/div&gt;\n      &lt;button&gt;Read More&lt;\/button&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n\n  &lt;div class=&quot;inner_part&quot;&gt;\n    &lt;label for=&quot;slideImg&quot; class=&quot;img&quot;&gt;\n      &lt;img class=&quot;img_3&quot; src=&quot;https:\/\/c4.wallpaperflare.com\/wallpaper\/620\/34\/558\/turkey-izmir-mountains-wallpaper-preview.jpg&quot;&gt;\n    &lt;\/label&gt;\n    &lt;div class=&quot;content content_3&quot;&gt;\n      &lt;div class=&quot;title&quot;&gt;\u0130zmir&lt;\/div&gt;\n      &lt;div class=&quot;text&quot;&gt;Located on the shores of the Aegean Sea, west of the Anatolian Peninsula, \u0130zmir is the third-largest city in Turkey.\n      &lt;\/div&gt;\n      &lt;button&gt;Read More&lt;\/button&gt;\n    &lt;\/div&gt;\n  &lt;\/div&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;}\">* {\n\tmargin: 0;\n\tpadding: 0;\n\tbox-sizing: border-box;\n  }\n  \n  html, body {\n\theight: 100vh;\n\tfont-family: 'Open Sans', sans-serif;\n\tbackground-color: #666666;\n  }\n  \n  body {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n  }\n  \n  .card {\n\tposition: absolute;\n\theight: 350px;\n\twidth: 100%;\n\tmax-width: 850px;\n\tmargin: auto;\n\tbackground-color: #ffffff;\n\tborder-radius: 25px;\n\tbox-shadow: 10px 0 50px rgba(0, 0, 0, 0.5);\n  }\n  \n  .card .inner_part {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tpadding: 0 0 0 30px;\n\theight: 350px;\n\tposition: absolute;\n  }\n  \n  #slideImg:checked ~ .inner_part {\n\tpadding: 0;\n\ttransition: .1s ease-in;\n  }\n  \n  .inner_part .img {\n\theight: 260px;\n\twidth: 260px;\n\toverflow: hidden;\n\tflex-shrink: 0;\n\tborder-radius: 20px;\n\tbox-shadow: 0 10px 50px rgba(0,0,0,0.2);\n  }\n  \n  #slideImg:checked ~ .inner_part .img {\n   height: 350px;\n   width: 850px;\n   z-index: 99;\n   transition: .3s .2s ease-in;\n  }\n  \n  .img img {\n\theight: 100%;\n\twidth: 100%;\n\tcursor: pointer;\n\topacity: 0;\n\ttransition: .6s;\n  }\n  \n  #slide_1:checked ~ .inner_part .img_1,\n  #slide_2:checked ~ .inner_part .img_2,\n  #slide_3:checked ~ .inner_part .img_3 {\n\topacity: 1;\n\ttransition-delay: .2s;\n  }\n  \n  .content {\n\tpadding: 0 20px 0 35px;\n\twidth: 530px;\n\tmargin-left: 50px;\n\topacity: 0;\n\ttransition: .6s; \n  }\n  \n  #slideImg:checked ~ .inner_part .content {\n\tdisplay: none;\n  }\n  \n  #slide_1:checked ~ .inner_part .content_1,\n  #slide_2:checked ~ .inner_part .content_2,\n  #slide_3:checked ~ .inner_part .content_3 {\n\topacity: 1;\n\tmargin-left: 0;\n\tz-index: 100;\n\ttransition-delay: .3s;\n  }\n  \n  .content .title {\n\tfont-size: 30px;\n\tfont-weight: 700;\n\tcolor: #0d0925;\n\tmargin: 0 0 20px 0;\n  }\n  \n  .content .text {\n\tfont-size: 19px;\n\tcolor: #4e4a67;\n\tmargin: 0 auto 30px auto;\n\tline-height: 1.5em;\n\ttext-align: justify;\n  }\n  \n  .content button {\n\tpadding: 15px 20px;\n\tborder: none;\n\tfont-size: 16px;\n\tcolor: #fff0e6;\n\tfont-weight: 600;\n\tletter-spacing: 1px;\n\tborder-radius: 50px;\n\tcursor: pointer;\n\toutline: none;\n\tbackground: #000000;\n\tfloat: right;\n  }\n  \n  .content button:hover {\n\tbackground: #cecece;\n\tcolor: #000000;\n  }\n  \n  .slider {\n\tposition: absolute;\n\tbottom: 25px;\n\tleft: 55%;\n\ttransform: translateX(-50%);\n\tz-index: 1;\n  }\n  \n  #slideImg:checked ~ .slider {\n\tdisplay: none;\n  }\n  \n  .slider .slide {\n\tposition: relative;\n\theight: 10px;\n\twidth: 50px;\n\tbackground: #d9d9d9;\n\tborder-radius: 5px;\n\tdisplay: inline-flex;\n\tmargin: 0 3px;\n\tcursor: pointer;\n  }\n  \n  \n  .slider .slide:before {\n\tposition: absolute;\n\tcontent: '';\n\ttop: 0;\n\tleft: 0;\n\theight: 100%;\n\twidth: -100%;\n\tbackground: #000000;;\n\tborder-radius: 10px;\n\ttransform: scaleX(0);\n\ttransition: transform .6s;\n\ttransform-origin: left;\n  }\n  \n  #slide_1:checked ~ .slider .slide_1:before,\n  #slide_2:checked ~ .slider .slide_2:before,\n  #slide_3:checked ~ .slider .slide_3:before {\n\ttransform: scaleX(1);\n\twidth: 100%;\n  }\n  \n  input {\n\tdisplay: none;\n  }<\/pre><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1712,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[16],"class_list":["post-1710","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cards","tag-htmlcss"],"_links":{"self":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1710","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=1710"}],"version-history":[{"count":1,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1710\/revisions"}],"predecessor-version":[{"id":1713,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1710\/revisions\/1713"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media\/1712"}],"wp:attachment":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media?parent=1710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/categories?post=1710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/tags?post=1710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}