How can I access style properties on javascript objects which are using external style sheets?

前端 未结 4 961
长发绾君心
长发绾君心 2021-01-13 10:49

I have an external style sheet with this in it:

.box {
padding-left:30px;
background-color: #BBFF88;
border-width: 0;
overflow: hidden;
width: 400px;
height:         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-13 11:23

    The answers are mostly correct, but will do your head in when you try to use them as they depend on the rendering mode of the browser (aka strict/quirks mode, browser vender, etc) - the last answer is the best... use jquery.

提交回复
热议问题