diff options
Diffstat (limited to 'files/pt-br/web/css/margin-top/index.html')
-rw-r--r-- | files/pt-br/web/css/margin-top/index.html | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/files/pt-br/web/css/margin-top/index.html b/files/pt-br/web/css/margin-top/index.html new file mode 100644 index 0000000000..5151416465 --- /dev/null +++ b/files/pt-br/web/css/margin-top/index.html @@ -0,0 +1,145 @@ +--- +title: margin-top +slug: Web/CSS/margin-top +translation_of: Web/CSS/margin-top +--- +<div>{{CSSRef}}</div> + +<h2 id="Summary" name="Summary">Sumário</h2> + +<p><img alt="The effect of the CSS margin-top property on the element box" src="/files/4101/margin-top.svg" style="border-style: solid; border-width: 1px; float: left; margin-bottom: 2em; margin-right: 1em;"><span class="seoSummary">A propriedade CSS <strong><code>margin-top</code></strong> de um elemento indica o espaço acima do elemento. Valores negativos são aceitos.</span></p> + +<p><span class="seoSummary">Essa propriedade não tem efeito em <em>elementos non-replaced</em> inline elements, como {{HTMLElement("tt")}} ou {{HTMLElement("span")}}.</span></p> + +<p>{{cssinfo}}</p> + +<h2 id="Syntax" name="Syntax">Sintaxe</h2> + +<pre class="brush:css">/* Valores <length> */ +margin-top: 10px; /* An absolute length */ +margin-top: 1em; /* A length relative to the text size */ +margin-top: 5%; /* A margin relative to the nearest block container's width */ + +/* Valores padrão */ +margin-top: auto; + +/* Valores globais */ +margin-top: inherit; +margin-top: initial; +margin-top: unset; +</pre> + +<h3 id="Values" name="Values">Valores</h3> + +<dl> + <dt><code><length></code></dt> + <dd>Especifica um tamanho fixo. Veja {{cssxref("<length>")}} para possíveis valores.</dd> + <dt><code><porcentagem></code></dt> + <dd>Um {{cssxref("<percentage>")}} sempre relativo ao <strong>width</strong> do bloco.</dd> + <dt><code>auto</code></dt> + <dd>Veja {{cssxref("margin")}}.</dd> +</dl> + +<h3 id="Sintaxe_formal">Sintaxe formal</h3> + +<pre class="syntaxbox">{{csssyntax}}</pre> + +<h2 id="Examples" name="Examples">Exemplos</h2> + +<pre class="brush:css;">.content { margin-top: 5%; } +.sidebox { margin-top: 10px; } +.logo { margin-top: -5px; } +#footer { margin-top: 1em; } +</pre> + +<h2 id="Specifications" name="Specifications">Especificações</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Especificação</th> + <th scope="col">Status</th> + <th scope="col">Comentário</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('CSS3 Box', '#the-margin', 'margin-top')}}</td> + <td>{{Spec2('CSS3 Box')}}</td> + <td>Sem mudança significativa.</td> + </tr> + <tr> + <td>{{SpecName('CSS3 Transitions', '#animatable-css', 'margin-top')}}</td> + <td>{{Spec2('CSS3 Transitions')}}</td> + <td>Define <code>margin-top</code> como animável.</td> + </tr> + <tr> + <td>{{SpecName('CSS2.1', 'box.html#margin-properties', 'margin-top')}}</td> + <td>{{Spec2('CSS2.1')}}</td> + <td>Remove esse efeito em elementos inline.</td> + </tr> + <tr> + <td>{{SpecName('CSS1', '#margin-top', 'margin-top')}}</td> + <td>{{Spec2('CSS1')}}</td> + <td>Definição inicial.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_Compatibility" name="Browser_Compatibility">Compatibilidade de 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 (WebKit)</th> + </tr> + <tr> + <td>Suporte básico</td> + <td>1.0</td> + <td>{{CompatGeckoDesktop("1")}}</td> + <td>3.0</td> + <td>3.5</td> + <td>1.0 (85)</td> + </tr> + <tr> + <td><code>Valor auto</code></td> + <td>1.0</td> + <td>{{CompatGeckoDesktop("1")}}</td> + <td>6.0 (strict mode)</td> + <td>3.5</td> + <td>1.0 (85)</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> |