{"id":748,"date":"2020-07-03T23:58:28","date_gmt":"2020-07-04T02:58:28","guid":{"rendered":"https:\/\/www.joemaster.com.br\/tutoriais\/?p=748"},"modified":"2022-12-09T08:22:27","modified_gmt":"2022-12-09T11:22:27","slug":"unidades-css","status":"publish","type":"post","link":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/","title":{"rendered":"Unidades CSS"},"content":{"rendered":"<p>CSS possui v\u00e1rias unidades diferentes para expressar um comprimento.<\/p>\n<p>Muitas propriedades CSS assumir valores &#8220;comprimento&#8221;, tais como <code>width, margin, padding, font-size,<\/code> etc.<\/p>\n<p>Comprimento \u00e9 um n\u00famero seguido por uma unidade de comprimento, como 10px, 2em, etc.<\/p>\n<p>Um espa\u00e7o em branco n\u00e3o pode aparecer entre o n\u00famero e a unidade. No entanto, se o valor for 0, a unidade poder\u00e1 ser omitida.<\/p>\n<p>Para algumas propriedades CSS, comprimentos negativos s\u00e3o permitidos.<\/p>\n<p>Existem dois tipos de unidades de comprimento: absoluto e relativo.<\/p>\n<p><strong>Comprimentos absolutos<\/strong><br \/>\nAs unidades de comprimento absoluto s\u00e3o fixas e um comprimento expresso em qualquer uma dessas op\u00e7\u00f5es aparecer\u00e1 exatamente com esse tamanho.<\/p>\n<p>As unidades de comprimento absoluto n\u00e3o s\u00e3o recomendadas para uso na tela, porque os tamanhos das telas variam muito. No entanto, eles podem ser usados \u200b\u200bse a m\u00eddia de sa\u00edda for conhecida, como no layout de impress\u00e3o.<\/p>\n<p id=\"xPstfkF\"><img decoding=\"async\" loading=\"lazy\" width=\"511\" height=\"444\" class=\"alignnone size-full wp-image-749 \" src=\"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2020\/07\/unidades-css-1.png\" alt=\"\" srcset=\"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2020\/07\/unidades-css-1.png 511w, https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2020\/07\/unidades-css-1-300x261.png 300w\" sizes=\"(max-width: 511px) 100vw, 511px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>* Pixels (px) s\u00e3o relativos ao dispositivo de visualiza\u00e7\u00e3o. Para dispositivos de baixa resolu\u00e7\u00e3o, 1 px \u00e9 um pixel de dispositivo (ponto) da tela. Para impressoras e telas de alta resolu\u00e7\u00e3o, 1px implica v\u00e1rios pixels do dispositivo.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Comprimentos relativos<\/strong><br \/>\nAs unidades de comprimento relativo especificam um comprimento em rela\u00e7\u00e3o a outra propriedade de comprimento. As unidades de comprimento relativo escalam melhor entre diferentes meios de renderiza\u00e7\u00e3o.<\/p>\n<p id=\"IkRtiKh\"><img decoding=\"async\" loading=\"lazy\" width=\"136\" height=\"664\" class=\"alignnone size-full wp-image-750 \" src=\"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2020\/07\/unidades-css.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Veja alguns exemplos<\/strong><\/p>\n<p>Cent\u00edmetros<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {font-size: 1.5cm;}\r\nh2 {font-size: 1cm;}\r\np {\r\n  font-size: 0.5cm;\r\n  line-height: 1cm;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;This is heading 1&lt;\/h1&gt;\r\n&lt;h2&gt;This is heading 2&lt;\/h2&gt;\r\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;\r\n&lt;p&gt;This is another paragraph.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>&nbsp;<\/p>\n<p>Mil\u00edmetros<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {font-size: 15mm;}\r\nh2 {font-size: 10mm;}\r\np {\r\n  font-size: 5mm;\r\n  line-height: 10mm;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;This is heading 1&lt;\/h1&gt;\r\n&lt;h2&gt;This is heading 2&lt;\/h2&gt;\r\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;\r\n&lt;p&gt;This is another paragraph.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>In<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {font-size: 1in;}\r\nh2 {font-size: 0.5in;}\r\np {\r\n  font-size: 0.2in;\r\n  line-height: 0.5in;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;This is heading 1&lt;\/h1&gt;\r\n&lt;h2&gt;This is heading 2&lt;\/h2&gt;\r\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;\r\n&lt;p&gt;This is another paragraph.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>px<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {font-size: 50px;}\r\nh2 {font-size: 30px;}\r\np {\r\n  font-size: 15px;\r\n  line-height: 20px;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;This is heading 1&lt;\/h1&gt;\r\n&lt;h2&gt;This is heading 2&lt;\/h2&gt;\r\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;\r\n&lt;p&gt;This is another paragraph.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>pt<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {font-size: 50pt;}\r\nh2 {font-size: 25pt;}\r\np {\r\n  font-size: 15pt;\r\n  line-height: 25pt;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;This is heading 1&lt;\/h1&gt;\r\n&lt;h2&gt;This is heading 2&lt;\/h2&gt;\r\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;\r\n&lt;p&gt;This is another paragraph.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>pc<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {font-size: 4.5pc;}\r\nh2 {font-size: 3pc;}\r\np {\r\n  font-size: 1.5pc;\r\n  line-height: 3pc;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;This is heading 1&lt;\/h1&gt;\r\n&lt;h2&gt;This is heading 2&lt;\/h2&gt;\r\n&lt;p&gt;This is a paragraph.&lt;\/p&gt;\r\n&lt;p&gt;This is another paragraph.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>em<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\np {\r\n  font-size: 16px;\r\n  line-height: 2em;\r\n}\r\n\r\ndiv {\r\n  font-size: 30px;\r\n  border: 1px solid black;\r\n}\r\n\r\nspan {\r\n  font-size: 0.5em;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;p&gt;These paragraphs have a calculated line-height of: 2x16px = 32px.&lt;\/p&gt;\r\n&lt;p&gt;These paragraphs have a calculated line-height of: 2x16px = 32px.&lt;\/p&gt;\r\n&lt;p&gt;These paragraphs have a calculated line-height of: 2x16px = 32px.&lt;\/p&gt;\r\n&lt;div&gt;The font-size of the div element is set to 30px. &lt;span&gt;The span element inside the div element has a font-size of 0.5em, which equals to 0.5x30 = 15px&lt;\/span&gt;.&lt;\/div&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>ex<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\ndiv {\r\n  font-size: 30px;\r\n  border: 1px solid black;\r\n}\r\n\r\nspan {\r\n  font-size: 1ex;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;div&gt;The font-size of the div element is set to 30px. &lt;span&gt;The span element inside the div element has a font-size of 1ex&lt;\/span&gt;.&lt;\/div&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>ch<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nbody {\r\n  font-size:16px;\r\n}\r\n\r\ndiv {\r\n  font-size: 3ch;\r\n  border: 1px solid black;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;p&gt;The font-size of this document is 16px.&lt;\/p&gt;\r\n\r\n&lt;div&gt;The font-size of this div element is 3ch.&lt;\/div&gt;\r\n\r\n&lt;p&gt;The ch unit sets the font-size relative to the width of the character \"0\".&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>rem<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nhtml {\r\n  font-size:16px;\r\n}\r\n\r\ndiv {\r\n  font-size: 3rem;\r\n  border: 1px solid black;\r\n}\r\n\r\n#top-div {\r\n  font-size: 2rem;\r\n  border: 1px solid red;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;p&gt;The font-size of this document is 16px.&lt;\/p&gt;\r\n\r\n&lt;div id=\"top-div\"&gt;\r\nThe font-size of this div element is 2rem, which translates to 2 x the browser's font size.\r\n&lt;div&gt;The font-size of this div element is 3rem. It also shows that it does not inherit from its parent element font size.&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n\r\n&lt;p&gt;The rem unit sets the font-size relative to the browsers base font-size, and will not inherit from its parents.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>vw<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {\r\n  font-size: 20vw;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;Hello&lt;\/h1&gt;\r\n\r\n&lt;p&gt;Resize the width of the browser window to see how the font-size of h1 changes.&lt;\/p&gt;\r\n&lt;p&gt;1vw = 1% of viewport width.&lt;\/p&gt;\r\n&lt;p&gt;The vw unit is not supported in IE8 and earlier.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>vh<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {\r\n  font-size: 20vh;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;Hello&lt;\/h1&gt;\r\n\r\n&lt;p&gt;Resize the height of the browser window to see how the font-size of h1 changes.&lt;\/p&gt;\r\n&lt;p&gt;1vh = 1% of viewport height.&lt;\/p&gt;\r\n&lt;p&gt;The vh unit is not supported in IE8 and earlier.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>vmin<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {\r\n  font-size: 15vmin;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;Hello&lt;\/h1&gt;\r\n\r\n&lt;p&gt;Resize the browser window (both width and height) to see how the font-size of h1 changes.&lt;\/p&gt;\r\n&lt;p&gt;1vmin = 1vw or 1vh, whichever is smaller.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>vmax<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nh1 {\r\n  font-size: 15vmax;\r\n}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;h1&gt;Hello&lt;\/h1&gt;\r\n\r\n&lt;p&gt;Resize the browser window (both width and height) to see how the font-size of h1 changes.&lt;\/p&gt;\r\n&lt;p&gt;1vmax = 1vw or 1vh, whichever is larger.&lt;\/p&gt;\r\n&lt;p&gt;The vmax unit is not supported in Edge 15 and earlier, nor in Safari 6.1 and earlier.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>%<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;style&gt;\r\nbody {\r\n font-size:16px;\r\n}\r\n\r\ndiv {\r\n  font-size: 150%;\r\n  border: 1px solid black;\r\n}\r\n\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n\r\n&lt;p&gt;The font-size of this document is 16px.&lt;\/p&gt;\r\n\r\n&lt;div&gt;The font-size of this div element is 150%.&lt;\/div&gt;\r\n\r\n&lt;p&gt;The % unit sets the font-size relative to the current font-size.&lt;\/p&gt;\r\n\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<center><input type=\"button\" name=\"Submit\" value=\"Testar c&oacute;digo\" onClick=\"document.getElementById('divcode').style.display='block';\" style=\"background-color:#FFCC05;border-radius:15px;padding:10px;width:150px;color:#000;\"><br><br><\/center>\n<p>&nbsp;<\/p>\n<div id=\"divcode\" style=\"display:none;z-index:200000001;padding:10px;border-radius:10px;background-color: #0054A1; position:fixed;top:100px;left: 50%;transform: translate(-50%, 0);\">\n  <font color=#fff>Ap\u00f3s clicar em Copy &#8663;<br>O c&oacute;digo fica pronto para testar ou colar onde quiser no  CTRL+V<\/font>\n  <form name=\"codigo\" id=\"codigo\"  method=\"post\" action=\"https:\/\/www.joemaster.com.br\/codigos\/gerar_codigo.php\" target=\"_blank\"><textarea name=\"testarcodigo\" id=\"testarcodigo\"  cols=\"30\" rows=\"30\" wrap=\"VIRTUAL\"><\/textarea><\/form><input type=\"button\" name=\"Submit\" value=\"Testar\" onClick=\"if(document.getElementById('testarcodigo').value ==''){alert('Copie o c\u00f3digo conforme descrito acima!');}else{document.getElementById('codigo').submit();setTimeout(function(){document.getElementById('testarcodigo').value='';document.getElementById('divcode').style.display='none'; }, 1000);}\" style=\"background-color:#FFCC05;border-radius:15px;padding:5px;width:100px;color:#000;\">\n  <input type=\"button\" name=\"Submit\" value=\"Fechar\" onClick=\"document.getElementById('testarcodigo').value='';document.getElementById('divcode').style.display='none';\" style=\"background-color:#FFCC05;border-radius:15px;padding:5px;width:100px;color:#000;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>CSS possui v\u00e1rias unidades diferentes para expressar um comprimento. Muitas propriedades CSS assumir valores &#8220;comprimento&#8221;, tais como width, margin, padding, font-size, etc. Comprimento \u00e9 um n\u00famero seguido por uma unidade de comprimento, como 10px, 2em, etc. Um espa\u00e7o em branco n\u00e3o pode aparecer entre o n\u00famero e a unidade. No entanto, se o valor for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":74,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[118],"tags":[124,119,121,10,26,122,16,99,120,123,125],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Unidades CSS - JoeMaster<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Unidades CSS - JoeMaster\" \/>\n<meta property=\"og:description\" content=\"CSS possui v\u00e1rias unidades diferentes para expressar um comprimento. Muitas propriedades CSS assumir valores &#8220;comprimento&#8221;, tais como width, margin, padding, font-size, etc. Comprimento \u00e9 um n\u00famero seguido por uma unidade de comprimento, como 10px, 2em, etc. Um espa\u00e7o em branco n\u00e3o pode aparecer entre o n\u00famero e a unidade. No entanto, se o valor for [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/\" \/>\n<meta property=\"og:site_name\" content=\"JoeMaster\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-04T02:58:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-09T11:22:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2020\/06\/img_5ef0e8127daaa.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"joemaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"joemaster\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/\"},\"author\":{\"name\":\"joemaster\",\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/228e8f1dfe22da473e356f81c1033a9d\"},\"headline\":\"Unidades CSS\",\"datePublished\":\"2020-07-04T02:58:28+00:00\",\"dateModified\":\"2022-12-09T11:22:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/\"},\"wordCount\":257,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/228e8f1dfe22da473e356f81c1033a9d\"},\"keywords\":[\"background\",\"cascata\",\"cores\",\"css\",\"estilo\",\"formata\u00e7\u00e3o\",\"html\",\"html5\",\"layout\",\"Style Sheets\",\"text\"],\"articleSection\":[\"curso css\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/\",\"url\":\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/\",\"name\":\"Unidades CSS - JoeMaster\",\"isPartOf\":{\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/#website\"},\"datePublished\":\"2020-07-04T02:58:28+00:00\",\"dateModified\":\"2022-12-09T11:22:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/www.joemaster.com.br\/tutoriais\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Unidades CSS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/#website\",\"url\":\"https:\/\/www.joemaster.com.br\/tutoriais\/\",\"name\":\"JoeMaster\",\"description\":\"Tutoriais de WEB e APLICATIVOS EM HTML5, PHP, JS, CSS\",\"publisher\":{\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/228e8f1dfe22da473e356f81c1033a9d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.joemaster.com.br\/tutoriais\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-BR\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/228e8f1dfe22da473e356f81c1033a9d\",\"name\":\"joemaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2022\/05\/joemaster.jpg\",\"contentUrl\":\"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2022\/05\/joemaster.jpg\",\"width\":1461,\"height\":281,\"caption\":\"joemaster\"},\"logo\":{\"@id\":\"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/joemaster.com.br\/tutoriais\"],\"url\":\"https:\/\/www.joemaster.com.br\/tutoriais\/author\/joemaster\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Unidades CSS - JoeMaster","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/","og_locale":"pt_BR","og_type":"article","og_title":"Unidades CSS - JoeMaster","og_description":"CSS possui v\u00e1rias unidades diferentes para expressar um comprimento. Muitas propriedades CSS assumir valores &#8220;comprimento&#8221;, tais como width, margin, padding, font-size, etc. Comprimento \u00e9 um n\u00famero seguido por uma unidade de comprimento, como 10px, 2em, etc. Um espa\u00e7o em branco n\u00e3o pode aparecer entre o n\u00famero e a unidade. No entanto, se o valor for [&hellip;]","og_url":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/","og_site_name":"JoeMaster","article_published_time":"2020-07-04T02:58:28+00:00","article_modified_time":"2022-12-09T11:22:27+00:00","og_image":[{"width":900,"height":506,"url":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2020\/06\/img_5ef0e8127daaa.jpg","type":"image\/jpeg"}],"author":"joemaster","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"joemaster","Est. tempo de leitura":"8 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/#article","isPartOf":{"@id":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/"},"author":{"name":"joemaster","@id":"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/228e8f1dfe22da473e356f81c1033a9d"},"headline":"Unidades CSS","datePublished":"2020-07-04T02:58:28+00:00","dateModified":"2022-12-09T11:22:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/"},"wordCount":257,"commentCount":0,"publisher":{"@id":"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/228e8f1dfe22da473e356f81c1033a9d"},"keywords":["background","cascata","cores","css","estilo","formata\u00e7\u00e3o","html","html5","layout","Style Sheets","text"],"articleSection":["curso css"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/","url":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/","name":"Unidades CSS - JoeMaster","isPartOf":{"@id":"https:\/\/www.joemaster.com.br\/tutoriais\/#website"},"datePublished":"2020-07-04T02:58:28+00:00","dateModified":"2022-12-09T11:22:27+00:00","breadcrumb":{"@id":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.joemaster.com.br\/tutoriais\/unidades-css\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.joemaster.com.br\/tutoriais\/"},{"@type":"ListItem","position":2,"name":"Unidades CSS"}]},{"@type":"WebSite","@id":"https:\/\/www.joemaster.com.br\/tutoriais\/#website","url":"https:\/\/www.joemaster.com.br\/tutoriais\/","name":"JoeMaster","description":"Tutoriais de WEB e APLICATIVOS EM HTML5, PHP, JS, CSS","publisher":{"@id":"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/228e8f1dfe22da473e356f81c1033a9d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.joemaster.com.br\/tutoriais\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-BR"},{"@type":["Person","Organization"],"@id":"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/228e8f1dfe22da473e356f81c1033a9d","name":"joemaster","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/image\/","url":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2022\/05\/joemaster.jpg","contentUrl":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-content\/uploads\/2022\/05\/joemaster.jpg","width":1461,"height":281,"caption":"joemaster"},"logo":{"@id":"https:\/\/www.joemaster.com.br\/tutoriais\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/joemaster.com.br\/tutoriais"],"url":"https:\/\/www.joemaster.com.br\/tutoriais\/author\/joemaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/posts\/748"}],"collection":[{"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/comments?post=748"}],"version-history":[{"count":1,"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/posts\/748\/revisions"}],"predecessor-version":[{"id":1134,"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/posts\/748\/revisions\/1134"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/media\/74"}],"wp:attachment":[{"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/media?parent=748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/categories?post=748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joemaster.com.br\/tutoriais\/wp-json\/wp\/v2\/tags?post=748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}