2011-03-29 59 views
0

下面是一個示例形式:如何擺脫IE和Opera中的提交按鈕內邊框?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
<title>Sample Form</title> 
<style type="text/css"> 
input#send {width:80px; height:20px; padding:0; border:0;} 
div {width:80px; height:20px; border: 1px solid green} 
</style> 
</head> 
<body> 
<form name="input" action="" method="post"> 
<input type="text" name="user"> Name 
<div><input id="send" type="submit" value="Submit"></div> 
</form> 
</body> 
</html> 

按鈕獲得聚焦時,內部的虛線邊框的提交。

非常感謝您的幫助!

雨情人

回答

0

我相信,如果你改變你的頁面的一部分,所以它看起來像這樣你想這個CSS { outline : none; }

+0

恐怕沒有幫助。 – 2011-03-29 20:29:55

0

input#send {width:80px; height:20px; padding:0; border:0; outline: none;} 

它會奏效。我只是測試它,它在我的IE8上工作。

+0

在IE6和Opera11中,問題依然存在。 – 2011-03-30 15:56:12

+0

@RainLover:看起來你在這裏找到答案:http://www.sitepoint.com/forums/web-page-design-1/how-get-rid-submit-button-inner-border-ie-opera- 746520.html – 2011-03-30 22:00:28