propriedade HTML DOM Estilo captionSide
estilo Objects
Definição e Uso
captionSide conjuntos de propriedades ou retorna a posição do cabeçalho da tabela.
gramática
Definindo as propriedades captionSide:
Object.style.captionSide="top|bottom|inherit"
Propriedades captionSide Voltar:
Object.style.captionSide
值 | 描述 |
---|---|
top | 默认。把表格标题定位在表格之上。 |
bottom | 把表格标题定位在表格之下。 |
inherit | captionSide 属性的值从父元素继承。 |
Suporte a navegadores
Todos os principais navegadores suportam captionSide propriedade.
Nota: IE7 e versões anteriores não suportam captionSide propriedade.IE8 só fornece! DOCTYPE apoiado propriedade captionSide. IE9 apoiar captionSide propriedade.
Exemplos
Exemplos
O cabeçalho da tabela para a parte inferior da tabela:
<! DOCTYPE html>
<Html>
<Head>
<Charset Meta = "utf-8">
<Title> Este tutorial (w3big.com) </ title>
<Script>
displayResult function () {
. Document.getElementById ( "myCap") style.captionSide = "bottom";
}
</ Script>
</ Head>
<Body>
<Table border = "1">
<Caption id = "myCap"> Minhas economias </ caption>
<Tr>
<Th> Mês </ th>
<Th> Poupança </ th>
</ Tr>
<Tr>
<Td> Janeiro </ td>
<Td> $ 100 </ td>
</ Tr>
<Tr>
<Td> Fevereiro </ td>
<Td> $ 150 </ td>
</ Tr>
</ Table>
<br>
<Button type = "button" onclick = "displayResult ()"> Mobile título da tabela </ button>
</ Body>
</ Html>
<Html>
<Head>
<Charset Meta = "utf-8">
<Title> Este tutorial (w3big.com) </ title>
<Script>
displayResult function () {
. Document.getElementById ( "myCap") style.captionSide = "bottom";
}
</ Script>
</ Head>
<Body>
<Table border = "1">
<Caption id = "myCap"> Minhas economias </ caption>
<Tr>
<Th> Mês </ th>
<Th> Poupança </ th>
</ Tr>
<Tr>
<Td> Janeiro </ td>
<Td> $ 100 </ td>
</ Tr>
<Tr>
<Td> Fevereiro </ td>
<Td> $ 150 </ td>
</ Tr>
</ Table>
<br>
<Button type = "button" onclick = "displayResult ()"> Mobile título da tabela </ button>
</ Body>
</ Html>
tente »
estilo Objects