解决css样式被内置样式覆盖的问题

.preImg {        
  height
:400px !important }

<img id="preImg" class="preImg" style="width:100px;height:70px;background-color:#ccc;border:1px solid #333"/>

以上代码即可保证idpreImg的图片高度为400px,而不会被其自身的style覆盖。

posted @ 2013-12-02 23:39  于辰  阅读(3184)  评论(0编辑  收藏  举报