如何防止IE7中文字区背景图片滚动?[已关闭]

问题描述 投票:1回答:2

我只是一个html的初学者。我试图使用背景图片的文本区域。在firefox中看起来很好,但在internet explorer中就不行了。

.txt_area{ 
    background-image:url(../images/textarea_normal.png); 
    background-color:transparent; 
    background-repeat:no-repeat;
    color:#999999; 
    width:311px; 
    height:91px; 
    padding-left:35px; 
    padding-right:10px; 
    border:0px; 
    padding-top:10px; 
    padding-bottom:10px; 
    font-size:12px; 
}
.txt_area:focus{ 
    background-image:url(../images/textarea_focus.png); 
    color:#000000;
}
<textarea id="message" class="txt_area" 
    onFocus="remove_email('message','Message');" 
    onKeyPress="chgclr('message','Message')"  
    rows="" name="message" cols="">Message</textarea>

在internet explorer中,如果我在文本区域输入文字,背景图片也会随着内容滚动。我使用的是ie7。我如何能纠正它?

html css internet-explorer-7
2个回答
3
投票
© www.soinside.com 2019 - 2024. All rights reserved.