{"id":1380,"date":"2023-05-03T15:57:11","date_gmt":"2023-05-03T12:57:11","guid":{"rendered":"https:\/\/notes.profidev.online\/?p=1380"},"modified":"2023-05-03T15:58:03","modified_gmt":"2023-05-03T12:58:03","slug":"responsive-image-gallery","status":"publish","type":"post","link":"https:\/\/notes.profidev.online\/ru\/other\/1380\/","title":{"rendered":"Responsive Image Gallery"},"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=\"Responsive Image Gallery\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/hFF8Vs8OJ7E?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;link href=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/twitter-bootstrap\/3.3.7\/css\/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&gt;\n  &lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/animate.css\/3.5.1\/animate.min.css&quot;&gt;\n  &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot;&gt;\n\n  &lt;h1&gt;Responsive Image Gallery&lt;\/h1&gt;&lt;hr&gt;\n  &lt;div id=&quot;gallery&quot; class=&quot;container-fluid&quot;&gt;  \n    &lt;img src=&quot;https:\/\/source.unsplash.com\/1600x1200?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n    &lt;img src=&quot;https:\/\/source.unsplash.com\/1024x768?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n     &lt;img src=&quot;https:\/\/source.unsplash.com\/1366x768?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n    &lt;video class=&quot;vid&quot; controls&gt;\n      &lt;source src=&quot;http:\/\/commondatastorage.googleapis.com\/gtv-videos-bucket\/sample\/BigBuckBunny.mp4&quot; type=&quot;video\/mp4&quot;&gt;\n      &lt;\/source&gt;\n    &lt;\/video&gt;\n    &lt;img src=&quot;https:\/\/source.unsplash.com\/1920x1080?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n    &lt;img src=&quot;https:\/\/source.unsplash.com\/640x360?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n  &lt;img src=&quot;https:\/\/source.unsplash.com\/320x640?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n    &lt;img src=&quot;https:\/\/source.unsplash.com\/1200x1600?female,portrait&quot; class=&quot;card img-responsive&quot;&gt;\n    &lt;img src=&quot;https:\/\/source.unsplash.com\/800x600?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n    &lt;img src=&quot;https:\/\/source.unsplash.com\/600x800?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n    &lt;img src=&quot;https:\/\/source.unsplash.com\/400x600?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n    &lt;img src=&quot;https:\/\/source.unsplash.com\/600x400?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n  &lt;img src=&quot;https:\/\/source.unsplash.com\/1100x1600?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n  &lt;img src=&quot;https:\/\/source.unsplash.com\/1600x1100?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n  &lt;img src=&quot;https:\/\/source.unsplash.com\/992x768?female,portrait&quot; class=&quot;img-responsive&quot;&gt;\n  &lt;img src=&quot;https:\/\/source.unsplash.com\/768x992?female,portrait&quot; class=&quot;img-responsive&quot;&gt;  \n  &lt;\/div&gt;\n  &lt;div id=&quot;myModal&quot; class=&quot;modal fade&quot; role=&quot;dialog&quot;&gt;\n    &lt;div class=&quot;modal-dialog&quot;&gt;\n      &lt;!-- Modal content--&gt;\n      &lt;div class=&quot;modal-content&quot;&gt;\n        &lt;div class=&quot;modal-body&quot;&gt;\n        &lt;\/div&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n\n&lt;script src=&quot;https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/jquery\/2.2.2\/jquery.min.js&quot;&gt;&lt;\/script&gt;\n&lt;script src=&quot;https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.6\/js\/bootstrap.min.js&quot;&gt;&lt;\/script&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;}\">h1{\n\tfont-family: Satisfy;\n\tfont-size:50px;\n\ttext-align:center;\n\tcolor:black;\n\tpadding:1%;\n  }\n  #gallery{\n\t-webkit-column-count:4;\n\t-moz-column-count:4;\n\tcolumn-count:4;\n\t\n\t-webkit-column-gap:20px;\n\t-moz-column-gap:20px;\n\tcolumn-gap:20px;\n  }\n  @media (max-width:1200px){\n\t#gallery{\n\t-webkit-column-count:3;\n\t-moz-column-count:3;\n\tcolumn-count:3;\n\t  \n\t-webkit-column-gap:20px;\n\t-moz-column-gap:20px;\n\tcolumn-gap:20px;\n  }\n  }\n  @media (max-width:800px){\n\t#gallery{\n\t-webkit-column-count:2;\n\t-moz-column-count:2;\n\tcolumn-count:2;\n\t  \n\t-webkit-column-gap:20px;\n\t-moz-column-gap:20px;\n\tcolumn-gap:20px;\n  }\n  }\n  @media (max-width:600px){\n\t#gallery{\n\t-webkit-column-count:1;\n\t-moz-column-count:1;\n\tcolumn-count:1;\n  }  \n  }\n  #gallery img,#gallery video {\n\twidth:100%;\n\theight:auto;\n\tmargin: 4% auto;\n\tbox-shadow:-3px 5px 15px #000;\n\tcursor: pointer;\n\t-webkit-transition: all 0.2s;\n\ttransition: all 0.2s;\n  }\n  .modal-img,.model-vid{\n\twidth:100%;\n\theight:auto;\n  }\n  .modal-body{\n\tpadding:0px;\n  }<\/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;javascript&quot;,&quot;mime&quot;:&quot;text\/javascript&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;JavaScript&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;js&quot;}\">$(document).ready(function(){\n  $(&quot;img&quot;).click(function(){\n  var t = $(this).attr(&quot;src&quot;);\n  $(&quot;.modal-body&quot;).html(&quot;&lt;img src=&#039;&quot;+t+&quot;&#039; class=&#039;modal-img&#039;&gt;&quot;);\n  $(&quot;#myModal&quot;).modal();\n});\n\n$(&quot;video&quot;).click(function(){\n  var v = $(&quot;video &gt; source&quot;);\n  var t = v.attr(&quot;src&quot;);\n  $(&quot;.modal-body&quot;).html(&quot;&lt;video class=&#039;model-vid&#039; controls&gt;&lt;source src=&#039;&quot;+t+&quot;&#039; type=&#039;video\/mp4&#039;&gt;&lt;\/source&gt;&lt;\/video&gt;&quot;);\n  $(&quot;#myModal&quot;).modal();  \n});\n});\/\/EOF Document.ready<\/pre><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":1381,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[73],"class_list":["post-1380","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-other","tag-gallery"],"_links":{"self":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1380","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=1380"}],"version-history":[{"count":2,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1380\/revisions"}],"predecessor-version":[{"id":1383,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/posts\/1380\/revisions\/1383"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media\/1381"}],"wp:attachment":[{"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/media?parent=1380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/categories?post=1380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/notes.profidev.online\/ru\/wp-json\/wp\/v2\/tags?post=1380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}