{"id":7588,"date":"2021-04-10T22:37:56","date_gmt":"2021-04-10T19:37:56","guid":{"rendered":"https:\/\/elzero.org\/?p=7588"},"modified":"2022-09-28T17:56:23","modified_gmt":"2022-09-28T14:56:23","slug":"tutorials-tooltip-in-all-directions","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/tutorials-tooltip-in-all-directions\/","title":{"rendered":"Tooltip In All Directions"},"content":{"rendered":"<h3>\u0627\u0644 Code<\/h3>\r\n\r\n<script type=\"text\/plain\" class=\"language-html\">\r\n<button>\r\n  Click\r\n  <span>My Awesome Tooltip<\/span>\r\n<\/button>\r\n<\/script>\r\n\r\n<script type=\"text\/plain\" class=\"language-css\">\r\n* {\r\n  box-sizing: border-box;\r\n  padding: 0;\r\n  margin: 0;\r\n}\r\nbody {\r\n  font-family: Arial, Tahoma;\r\n}\r\nbutton {\r\n  background-color: #eee;\r\n  margin: 100px auto;\r\n  padding: 10px 20px;\r\n  display: block;\r\n  font-size: 40px;\r\n  border: none;\r\n  position: relative;\r\n  cursor: pointer;\r\n  overflow: hidden;\r\n}\r\nbutton:focus {\r\n  outline: none;\r\n}\r\nbutton span {\r\n  background-color: #333;\r\n  color: #fff;\r\n  position: absolute;\r\n  left: 50%;\r\n  transform: translateX(-50%);\r\n  font-size: 18px;\r\n  min-width: 240px;\r\n  padding: 10px 15px;\r\n  top: -60px;\r\n  transition: 0.5s;\r\n  opacity: 0;\r\n}\r\nbutton span:before {\r\n  content: \"\";\r\n  position: absolute;\r\n  bottom: -20px;\r\n  left: 50%;\r\n  transform: translateX(-50%);\r\n  border-style: solid;\r\n  border-width: 10px;\r\n  border-color: #333 transparent transparent;\r\n}\r\nbutton:hover {\r\n  overflow: visible;\r\n}\r\nbutton:hover span {\r\n  opacity: 1;\r\n}\r\n[data-position=\"bottom\"] span {\r\n  top: auto;\r\n  bottom: -60px;\r\n}\r\n[data-position=\"bottom\"] span:before {\r\n  bottom: auto;\r\n  top: -20px;\r\n  border-color: transparent transparent #333;\r\n}\r\n<\/script>","protected":false},"excerpt":{"rendered":"<p>\u0627\u0644 Code<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[879],"tags":[],"class_list":["post-7588","post","type-post","status-publish","format-standard","hentry","category-front-end-tutorials"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/7588","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=7588"}],"version-history":[{"count":3,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/7588\/revisions"}],"predecessor-version":[{"id":10356,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/7588\/revisions\/10356"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=7588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=7588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=7588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}