{"id":2639,"date":"2019-05-16T17:00:51","date_gmt":"2019-05-16T22:00:51","guid":{"rendered":"http:\/\/bluegalaxy.info\/codewalk\/?p=2639"},"modified":"2019-06-10T11:31:29","modified_gmt":"2019-06-10T16:31:29","slug":"html-css-how-to-skew-an-html-entity","status":"publish","type":"post","link":"https:\/\/bluegalaxy.info\/codewalk\/2019\/05\/16\/html-css-how-to-skew-an-html-entity\/","title":{"rendered":"HTML &#038; CSS: How to skew an HTML entity"},"content":{"rendered":"\n<p>Looking through the available HTML entities, I found a flattened DOWN arrow that uses the code <code>&amp;#9662;<\/code> For example:<\/p>\n\n\n\n<span style=\"font-size:100px; line-height: 30px;\">\u25be<\/span>\n\n\n\n<p>However, I could not find a similar flattened UP arrow amongst the defined HTML entities, so I found this CSS technique that will turn a regular unflattened UP arrow <code>&amp;#9652<\/code>;<\/p>\n\n\n\n<span style=\"font-size:100px; line-height: 30px;\">\u25b4<\/span>\n\n\n\n<p>into a flattened UP arrow. The trick is to place the HTML entity inside an HTML span element with a CSS class name, then in the CSS for that class name, use these two settings:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">transform: scaleX(2); \/* Stretch it x 2 on the x axis *\/\nposition:\u00a0absolute;<\/pre>\n\n\n\n<p>Here is what the HTML looks like for the skewed entity:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;span class=\"skewed-up-arrow\">&amp;#9652;&lt;\/span><\/pre>\n\n\n\n<p>Here is the complete example and code on codepen:<\/p>\n\n\n<p class='codepen'  data-height='290' data-theme-id='0' data-slug-hash='eaWpBd' data-default-tab='css,result' data-animations='run' data-editable='' data-embed-version='2'>\nSee the Pen CSS skew up arrow html entity by Chris Nielsen (@Chris_Nielsen) on CodePen.<\/p>\n\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>For more about the CSS skewX() function, see:<br><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/transform-function\/skewX\">https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/transform-function\/skewX<\/a><br><br>For more information about HTML entities, see:<br><a href=\"https:\/\/www.w3schools.com\/html\/html_entities.asp\">https:\/\/www.w3schools.com\/html\/html_entities.asp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looking through the available HTML entities, I found a flattened DOWN arrow that uses the code &amp;#9662; For example: \u25be However, I could not find a similar flattened UP arrow amongst the defined HTML entities, so I found this CSS technique that will turn a regular unflattened UP arrow &amp;#9652; \u25b4 into a flattened UP &hellip; <a href=\"https:\/\/bluegalaxy.info\/codewalk\/2019\/05\/16\/html-css-how-to-skew-an-html-entity\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">HTML &#038; CSS: How to skew an HTML entity<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104],"tags":[10,105,192,193],"class_list":["post-2639","post","type-post","status-publish","format-standard","hentry","category-html-css","tag-css","tag-html","tag-html-entity","tag-skewx"],"_links":{"self":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/2639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/comments?post=2639"}],"version-history":[{"count":48,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/2639\/revisions"}],"predecessor-version":[{"id":2748,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/2639\/revisions\/2748"}],"wp:attachment":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/media?parent=2639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/categories?post=2639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/tags?post=2639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}