Conversão das propriedades do CSS para o JavaScript

Aqui você verá artigos sobre JavaScript

Moderador: web

responder a dúvida

Conversão das propriedades do CSS para o JavaScript

Mensagem por web Offline » Seg Out 22, 2007 12:02 am


Quem precisa coverter uma propriedade do CSS para usar no JavaScript, segue uma lista abaixo.

Propiedade CSS Propiedade JavaScript
background background
background-attachment backgroundAttachment
background-color backgroundColor
background-image backgroundImage
background-position backgroundPosition
background-repeat backgroundRepeat
border border
border-bottom borderBottom
border-bottom-color borderBottomColor
border-bottom-style borderBottomStyle
border-bottom-width borderBottomWidth
border-color borderColor
border-left borderLeft
border-left-color borderLeftColor
border-left-style borderLeftStyle
border-left-width borderLeftWidth
border-right borderRight
border-right-color borderRightColor
border-right-style borderRightStyle
border-right-width borderRightWidth
border-style borderStyle
border-top borderTop
border-top-color borderTopColor
border-top-style borderTopStyle
border-top-width borderTopWidth
border-width borderWidth
clear clear
clip clip
color color
cursor cursor
display display
filter filter
font font
font-family fontFamily
font-size fontSize
font-variant fontVariant
font-weight fontWeight
height height
left left
letter-spacing letterSpacing
line-height lineHeight
list-style listStyle
list-style-image listStyleImage
list-style-position listStylePosition
list-style-type listStyleType
margin margin
margin-bottom marginBottom
margin-left marginLeft
margin-right marginRight
margin-top marginTop
overflow overflow
padding padding
padding-bottom paddingBottom
padding-left paddingLeft
padding-right paddingRight
padding-top paddingTop
page-break-after pageBreakAfter
page-break-before pageBreakBefore
position position
float styleFloat
text-align textAlign
text-decoration textDecoration
text-decoration: blink textDecorationBlink
text-decoration: line-through textDecorationLineThrough
text-decoration: none textDecorationNone
text-decoration: overline textDecorationOverline
text-decoration: underline textDecorationUnderline
text-indent textIndent
text-transform textTransform
top top
vertical-align verticalAlign
visibility visibility
width width
z-index zIndex

Para aplicar o estilo a um campo pelo id você pode usar:
document.getElementById('iddocampo').style.propiedade='valor';



detalhes...

Gostou do que encontrou? Divulgue, indique, participe, agradeça pelas respostas.

Faço scripts personalizados ou reparos em scripts. Orçamento MSN codigosnaweb1 [@] gmail [.] com

Avatar do usuário
web
ADMIN
ADMIN
Mensagens: 12425
Registrado em: Sáb Jan 20, 2007 6:08 pm
Localização: RJ / RJ / Brasil

responder a dúvida

Voltar para Artigos sobre JavaScript

Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 1 visitante

cron