07_04表單背景bug

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<style type="text/css">
<span style="white-space:pre">	</span>/*默認樣式重置*/
<span style="white-space:pre">	</span>input{padding: 0;margin: 0;}
<span style="white-space:pre">	</span> 
<span style="white-space:pre">	</span>.inputPic{width: 300px;height: 30px;border: 1px solid red; background: url(images/Pic.png) 0 center no-repeat; }
<span style="white-space:pre">	</span>.divPic{width: 300px;height: 30px;border: 1px solid red; background: url(images/Pic.png);}
<span style="white-space:pre">	</span>.divPic input{width: 300px;height: 30px;border: none; background:none;}
</style>
</head>
1.input標籤IE6下背景圖片bug:
<br />
<input type="text" class="inputPic" name="" />
<hr />
2.解決bug(父級div背景代替input背景):
<div class="divPic">
<input type="text"  name="" />
</div>
<body>
</body>
</html>

1.chrome下文本過長時顯示效果:


2.IE6下文本過長時顯示效果:


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章