{"id":1730,"date":"2023-09-17T23:14:02","date_gmt":"2023-09-17T20:14:02","guid":{"rendered":"https:\/\/notes.profidev.online\/?p=1730"},"modified":"2023-09-17T23:14:04","modified_gmt":"2023-09-17T20:14:04","slug":"modal-css","status":"publish","type":"post","link":"https:\/\/notes.profidev.online\/ru\/elements\/1730\/","title":{"rendered":"Modal css"},"content":{"rendered":"\n<figure class=\"wp-block-video\"><video height=\"944\" style=\"aspect-ratio: 944 \/ 944;\" width=\"944\" controls src=\"https:\/\/notes.profidev.online\/wp-content\/uploads\/2023\/09\/vokoscreenng-2023-09-17_22-02-16.mp4\"><\/video><\/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;link href=&quot;https:\/\/s3-us-west-2.amazonaws.com\/s.cdpn.io\/1462889\/unicons.css&quot; rel=&quot;stylesheet&quot;&gt;\n\n  &lt;div class=&quot;section full-height&quot;&gt;\n\t&lt;input class=&quot;modal-btn&quot; type=&quot;checkbox&quot; id=&quot;modal-btn&quot; name=&quot;modal-btn&quot;\/&gt;\n\t&lt;label for=&quot;modal-btn&quot;&gt;Open Modal &lt;i class=&quot;uil uil-expand-arrows&quot;&gt;&lt;\/i&gt;&lt;\/label&gt; \t\t\n\t&lt;div class=&quot;modal&quot;&gt;\t\t\n\t\t&lt;div class=&quot;modal-wrap&quot;&gt;\t\n\t\t  &lt;img src=&quot;https:\/\/assets.codepen.io\/1462889\/sl3.jpg&quot; alt=&quot;&quot;&gt;\t\n\t\t\t&lt;p&gt;Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.&lt;\/p&gt;\t          \t\t\n\t\t&lt;\/div&gt;\t\t\t          \t\t\n\t&lt;\/div&gt;\t\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;}\">@import url('https:\/\/fonts.googleapis.com\/css?family=Poppins:400,500,600,700,800,900');\n*,\n*::before,\n*::after {\n  box-sizing: border-box;\n}\nbody{\n\tfont-family: 'Poppins', sans-serif;\n\tfont-weight: 400;\n\tfont-size: 15px;\n\tline-height: 1.7;\n\tcolor: #1f2029;\n  \tbackground-color: #fff;\n  overflow: hidden;\n  background-image: url('https:\/\/assets.codepen.io\/1462889\/back-page.svg');\n  background-position: center;\n  background-repeat: no-repeat;\n  background-size: 101%;\n}\np{\n\tfont-family: 'Poppins', sans-serif;\n\tfont-weight: 400;\n\tfont-size: 16px;\n\tline-height: 1.7;\n\tcolor: #1f2029;\n}\n\n.section{\n  position: relative;\n  width: 100%;\n  display: block;\n  display: -ms-flexbox;\n  display: flex;\n  -ms-flex-wrap: wrap;\n  flex-wrap: wrap;\n  -ms-flex-pack: center;\n  justify-content: center;\n}\n.full-height{\n  min-height: 100vh;\n}\n\n[type=&quot;checkbox&quot;]:checked,\n[type=&quot;checkbox&quot;]:not(:checked){\n  position: absolute;\n  left: -9999px;\n}\n.modal-btn:checked + label,\n.modal-btn:not(:checked) + label{\n  position: relative;\n  font-family: 'Poppins', sans-serif;\n  font-weight: 500;\n  font-size: 15px;\n  line-height: 2;\n  height: 50px;\n  transition: all 200ms linear;\n  border-radius: 4px;\n  width: 240px;\n  letter-spacing: 1px;\n  display: -webkit-inline-flex;\n  display: -ms-inline-flexbox;\n  display: inline-flex;\n  -webkit-align-items: center;\n  -moz-align-items: center;\n  -ms-align-items: center;\n  align-items: center;\n  -webkit-justify-content: center;\n  -moz-justify-content: center;\n  -ms-justify-content: center;\n  justify-content: center;\n  -ms-flex-pack: center;\n  text-align: center;\n    -ms-flex-item-align: center;\n    align-self: center;\n  border: none;\n  cursor: pointer;\n  background-color: #102770;\n  color: #ffeba7;\n  box-shadow: 0 12px 35px 0 rgba(16,39,112,.25);\n}\n.modal-btn:not(:checked) + label:hover{\n  background-color: #ffeba7;\n  color: #102770;\n}\n.modal-btn:checked + label .uil,\n.modal-btn:not(:checked) + label .uil{\n\tmargin-left: 10px;\n\tfont-size: 18px;\n}\n.modal-btn:checked + label:after,\n.modal-btn:not(:checked) + label:after{\n  position: fixed;\n  top: 30px;\n  right: 30px;\n  z-index: 110;\n  width: 40px;\n  border-radius: 3px;\n  height: 30px;\n  text-align: center;\n  line-height: 30px;\n  font-size: 18px;\n  background-color: #ffeba7;\n  color: #102770;\n  font-family: 'unicons';\n  content: '\\eac6'; \n  box-shadow: 0 12px 25px 0 rgba(16,39,112,.25);\n  transition: all 200ms linear;\n  opacity: 0;\n  pointer-events: none;\n  transform: translateY(20px);\n}\n.modal-btn:checked + label:hover:after,\n.modal-btn:not(:checked) + label:hover:after{\n  background-color: #102770;\n  color: #ffeba7;\n}\n.modal-btn:checked + label:after{\n  transition: opacity 300ms 300ms ease, transform 300ms 300ms ease, background-color 250ms linear, color 250ms linear;\n  opacity: 1;\n  pointer-events: auto;\n  transform: translateY(0);\n}\n.modal{\n  position: fixed;\n  display: block;\n  display: -ms-flexbox;\n  display: flex;\n  -ms-flex-wrap: wrap;\n  flex-wrap: wrap;\n  -ms-flex-pack: center;\n  justify-content: center;\n  margin: 0 auto;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  z-index: 100;\n  overflow-x: hidden;\n  background-color: rgba(31,32,41,.75);\n  pointer-events: none;\n  opacity: 0;\n  transition: opacity 250ms 700ms ease;\n}\n.modal-btn:checked ~ .modal{\n  pointer-events: auto;\n  opacity: 1;\n  transition: all 300ms ease-in-out;\n}\n.modal-wrap {\n  position: relative;\n  display: block;\n  width: 100%;\n  max-width: 400px;\n  margin: 0 auto;\n  margin-top: 20px;\n  margin-bottom: 20px;\n  border-radius: 4px;\n  overflow: hidden;\n  padding-bottom: 20px;\n  background-color: #fff;\n    -ms-flex-item-align: center;\n    align-self: center;\n    box-shadow: 0 12px 25px 0 rgba(199,175,189,.25);\n  opacity: 0;\n  transform: scale(0.6);\n  transition: opacity 250ms 250ms ease, transform 300ms 250ms ease;\n}\n.modal-wrap img {\n  display: block;\n  width: 100%;\n  height: auto;\n}\n.modal-wrap p {\n  padding: 20px 30px 0 30px;\n}\n.modal-btn:checked ~ .modal .modal-wrap{\n  opacity: 1;\n  transform: scale(1);\n  transition: opacity 250ms 500ms ease, transform 350ms 500ms ease;\n}\n\n\n.logo {\n\tposition: absolute;\n\ttop: 25px;\n\tleft: 25px;\n\tdisplay: block;\n\tz-index: 1000;\n\ttransition: all 250ms linear;\n}\n.logo img {\n\theight: 26px;\n\twidth: auto;\n\tdisplay: block;\n  \tfilter: brightness(10%);\n\ttransition: filter 250ms 700ms linear;\n}\n.modal-btn:checked ~ .logo img {\n  \tfilter: brightness(100%);\n\ttransition: all 250ms linear;\n}\n\n\n@media screen and (max-width: 500px) {\n\t.modal-wrap {\n\t\twidth: calc(100% - 40px);\n\t\tpadding-bottom: 15px;\n\t}\n\t.modal-wrap p {\n\t  padding: 15px 20px 0 20px;\n\t}\n}<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1731,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[16,81],"class_list":["post-1730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-elements","tag-htmlcss","tag-modal"],"_links":{"self":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1730","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=1730"}],"version-history":[{"count":1,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1730\/revisions"}],"predecessor-version":[{"id":1733,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1730\/revisions\/1733"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media\/1731"}],"wp:attachment":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media?parent=1730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/categories?post=1730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/tags?post=1730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}