diff options
Diffstat (limited to 'files/pt-br/web/css/height/index.html')
-rw-r--r-- | files/pt-br/web/css/height/index.html | 192 |
1 files changed, 192 insertions, 0 deletions
diff --git a/files/pt-br/web/css/height/index.html b/files/pt-br/web/css/height/index.html new file mode 100644 index 0000000000..7d06fb0534 --- /dev/null +++ b/files/pt-br/web/css/height/index.html @@ -0,0 +1,192 @@ +--- +title: height +slug: Web/CSS/height +translation_of: Web/CSS/height +--- +<div>{{CSSRef()}}</div> + +<h2 id="Summary" name="Summary">Sumário</h2> + +<p>A propriedade <code>height</code> do CSS determina a altura da área do conteúdo de um elemento. A <a href="/en-US/docs/CSS/box_model#content" title="CSS/Box_model#content">área de conteúdo</a> consiste no <code>padding</code>, <code>margin</code> e <code>border </code>do elemento.</p> + +<p>As propriedades {{Cssxref("min-height")}} e {{Cssxref("max-height")}} sobrepõem a {{Cssxref("height")}}.</p> + +<p>{{cssinfo}}</p> + +<h2 id="Syntax" name="Syntax">Sintaxe</h2> + +<pre class="twopartsyntaxbox"><a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Sintaxe formal</a>: <code class="language-html">[<span class="tag token"><span class="tag token"><span class="punctuation token"><</span>length</span><span class="punctuation token">></span></span> | <span class="tag token"><span class="tag token"><span class="punctuation token"><</span>percentage</span><span class="punctuation token">></span></span>] && [border-box | content-box]? | available | min-content | max-content | fit-content | complex | auto</code> +</pre> + +<pre>height: auto /* auto keyword */ + +height: 120px /* <length> values */ +height: 10em + +height: 75% /* <percentage> values */ + +height: inherit +</pre> + +<h3 id="Values" name="Values">Valores</h3> + +<dl> + <dt><code style="font-size: 14px;"><length></code></dt> + <dd>Veja {{cssxref("<length>")}} para unidades disponíveis.</dd> + <dt><code style="font-size: 14px;"><percentage></code></dt> + <dd>Especificada como uma {{cssxref("<percentage>")}} da altura do conteúdo do bloco.</dd> + <dt><code style="font-size: 14px;">border-box </code>{{ experimental_inline }}</dt> + <dd>Se presente, o último {{cssxref("<length>")}} ou {{cssxref("<percentage>")}} é aplicado a caixa de borda do elemento.</dd> + <dt><code style="font-size: 14px;">content-box</code> {{ experimental_inline }}</dt> + <dd>Se presente, o último {{cssxref("<length>")}} ou {{cssxref("<percentage>")}} é aplicado a caixa de conteúdo do elemento.</dd> + <dt><code style="font-size: 14px;">auto</code></dt> + <dd>O navegador calculará a altura do conteúdo especificado.</dd> + <dt><code style="font-size: 14px;">max-content</code> {{ experimental_inline }}</dt> + <dd>A altura máxima intrínseca.</dd> + <dt><code style="font-size: 14px;">min-content</code> {{ experimental_inline }}</dt> + <dd>A altura mínima intrínseca.</dd> + <dt><code style="font-size: 14px;">available</code> {{ experimental_inline }}</dt> + <dd>Altura da caixa menos margem vertical, borda e padding.</dd> + <dt><code style="font-size: 14px;">fit-content</code> {{ experimental_inline }}</dt> + <dd>O maior de: + <ul> + <li>a altura mínima intrínseca</li> + <li>a menor entre a altura intrínseca preferida e a altura disponível</li> + </ul> + </dd> +</dl> + +<h2 id="Exemplos">Exemplos</h2> + +<h3 id="HTML">HTML</h3> + +<pre class="brush: html"><div id="red"> + <span>I'm 50 pixels tall.</span> +</div> +<div id="green"> + <span>I'm 25 pixels tall.</span> +</div> +<div id="parent"> + <div id="child"> + <span>I'm half the height of my parent.</span> + </div> +</div> +</pre> + +<h3 id="CSS">CSS</h3> + +<pre class="brush: css">div { + width: 250px; + margin-bottom: 5px; + border: 3px solid #999999; +} + +#red { + height: 50px; +} + +#green { + height: 25px; +} + +#parent { + height: 100px; +} + +#child { + height: 50%; + width: 75%; +} +</pre> + +<p>{{EmbedLiveSample('Exemplos')}}</p> + +<h2 id="Especificações">Especificações</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('CSS3 Box', '#the-width-and-height-properties', 'height')}}</td> + <td>{{Spec2('CSS3 Box')}}</td> + <td>Added the <code>max-content</code>, <code>min-content</code>, <code>available</code>, <code>fit-content</code>, <code>border-box</code>, <code>content-box</code> keywords.</td> + </tr> + <tr> + <td>{{SpecName('CSS3 Transitions', '#animatable-css', 'height')}}</td> + <td>{{Spec2('CSS3 Transitions')}}</td> + <td>Lists <code>height</code> as animatable.</td> + </tr> + <tr> + <td>{{SpecName('CSS2.1', 'visudet.html#the-height-property', 'height')}}</td> + <td>{{Spec2('CSS2.1')}}</td> + <td>Adds support for the {{cssxref("<length>")}} values and precises on which element it applies to.</td> + </tr> + <tr> + <td>{{SpecName('CSS1', '#height', 'height')}}</td> + <td>{{Spec2('CSS1')}}</td> + <td>Initial specification.</td> + </tr> + </tbody> +</table> + +<h2 id="Compatibilidade_entre_navegadores">Compatibilidade entre navegadores</h2> + +<p>{{CompatibilityTable()}}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Suporte básico</td> + <td>1.0</td> + <td>{{CompatGeckoDesktop("1")}}</td> + <td>4.0</td> + <td>7.0</td> + <td>1.0</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Suporte básico</td> + <td>1.0</td> + <td>{{CompatGeckoMobile("1")}}</td> + <td>6.0</td> + <td>6.0</td> + <td>1.0</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="See_also" name="See_also">Veja também</h2> + +<ul> + <li><a href="/en-US/docs/CSS/box_model" title="CSS/box_model">box model</a>, {{Cssxref("width")}}, {{Cssxref("box-sizing")}}, {{Cssxref("min-height")}}, {{Cssxref("max-height")}}</li> +</ul> |