2012-09-04 41 views
0
<span class="span3"> 
    <input type="text" class="dottedLineInput" placeholder="New milestone name"></niput> 
</span>​ 


textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input { 
background-color: white; 
border: 1px solid #CCC; 
-webkit-border-radius: 3px; 
-moz-border-radius: 3px; 
border-radius: 3px; 
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s; 
-moz-transition: border linear 0.2s, box-shadow linear 0.2s; 
-ms-transition: border linear 0.2s, box-shadow linear 0.2s; 
-o-transition: border linear 0.2s, box-shadow linear 0.2s; 
transition: border linear 0.2s, box-shadow linear 0.2s; 
} 

.dottedLineInput { 
border: 0 !important; 
margin-top:20px; 
-webkit-box-shadow: 0; 
-moz-box-shadow: 0; 
box-shadow: 0; 
border-bottom: 1px dotted #BBB !important; 
} 
.dottedLineInput:focus { 
outline: none; 
} 

這是代碼。一般選擇器樣式適用於我的輸入,我無法擺脫dottedLineInput類中的盒子陰影。我錯過了什麼?CSS:刪除通用選擇器應用的邊框

+0

嘗試添加邊框樣式:沒有; – karthikr

回答

1

嘗試none,那就是box-shadow的默認值:

-webkit-box-shadow: none; 
-moz-box-shadow: none; 
box-shadow: none; 

如果仍不能出於某種原因,嘗試添加!important

-webkit-box-shadow: none !important; 
-moz-box-shadow: none !important; 
box-shadow: none !important; 
+0

http://jsfiddle.net/Y2MT4/1/顯然不起作用 – Andrew

+0

「box-shadow」沒有'-ms-'或'-o-'前綴。 – BoltClock

+0

我已經更新了我的答案。你只需要添加'!important' – Simone