2011-01-21 76 views
-1

我写了这个CSS来让一个窗体在左边有一个小小的openid标志,但是我希望窗体保留其默认外观而不是让它看起来正确。Css输入形状

<html> 
<head> 
<style type="text/css"> 
.openid-input { 
    background: url("http://id.gesellix.de/logo/openid_small_logo_white.gif") no-repeat scroll left center transparent; 
    height: 22px; 
    line-height: 22px; 
    padding-left: 18px; 
} 
</style> 
</head> 

<body> 
<input type="text" tabindex="100" class="openid-input"> 
</body> 
</html> 
+1

需要更多的细节,什么*右angley看* – Jakub 2011-01-21 16:33:33

+0

我认为,我们需要看到的代码的形式,太 - 这是很难想象一个完全未知的形式。 – 2011-01-21 16:36:22

回答

1

只要更改背景属性,默认输入样式就会被覆盖。您必须设置CSS样式来模仿默认样式,但这只能用CSS3完成。以下样式与我的系统紧密匹配:

border:1px #e4e4e4 solid; 
box-shadow:inset 0 1px 2px #000000; 
-moz-box-shadow:inset 0 1px 2px #000000; 
-webkit-box-shadow:inset 0 1px 2px #000000; 

我有created an example here (link)

你可以得到相当接近的默认样式不CSS3只:

border:1px #cccccc solid; 
border-top:2px #666666 solid;