{"id":14077,"date":"2023-11-29T00:27:13","date_gmt":"2023-11-28T21:27:13","guid":{"rendered":"https:\/\/elzero.org\/?p=14077"},"modified":"2023-11-29T00:27:13","modified_gmt":"2023-11-28T21:27:13","slug":"css-scroll-padding-and-margin","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/css-scroll-padding-and-margin\/","title":{"rendered":"CSS Scroll Padding And Margin"},"content":{"rendered":"<h3>\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u062f\u0631\u0633<\/h3>\r\n\r\n<script type=\"text\/plain\" class=\"language-html\">\r\n<!-- \r\n  Scroll-Padding\r\n-->\r\n<h3>\r\n  <a href=\"#sec-1\">Section 1<\/a>\r\n  <a href=\"#sec-2\">Section 2<\/a>\r\n  <a href=\"#sec-3\">Section 3<\/a>\r\n<\/h3>\r\n<div id=\"sec-1\" class=\"sec-1\">Section 1<\/div>\r\n<div id=\"sec-2\" class=\"sec-2\">Section 2<\/div>\r\n<div id=\"sec-3\" class=\"sec-3\">Section 3<\/div>\r\n<\/script>\r\n\r\n<script type=\"text\/plain\" class=\"language-css\">\r\n* {\r\n  box-sizing: border-box;\r\n}\r\nhtml {\r\n  scroll-behavior: smooth;\r\n  scroll-padding-top: 62px;\r\n}\r\nbody {\r\n  margin: 0;\r\n}\r\nh3 {\r\n  margin: 0;\r\n  position: fixed;\r\n  top: 0;\r\n  right: 0;\r\n  background-color: black;\r\n  padding: 20px;\r\n  text-align: center;\r\n  width: 100%;\r\n  height: 62px;\r\n}\r\nh3 a {\r\n  color: white;\r\n}\r\ndiv {\r\n  height: 100vh;\r\n}\r\n.sec-1 {\r\n  padding-top: 62px;\r\n}\r\n.sec-2 {\r\n  background-color: #eee;\r\n}\r\n<\/script>","protected":false},"excerpt":{"rendered":"<p>\u0645\u062d\u062a\u0648\u0649 \u0627\u0644\u062f\u0631\u0633<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1423],"tags":[],"class_list":["post-14077","post","type-post","status-publish","format-standard","hentry","category-css-features"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/comments?post=14077"}],"version-history":[{"count":1,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14077\/revisions"}],"predecessor-version":[{"id":14078,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14077\/revisions\/14078"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=14077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=14077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=14077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}