我可以通过以下方式使文本框(部分)的背景和边框透明 -
<textarea id="one" style="background-color: rgba(0, 0, 0, 0); border-color: rgba(0, 0, 0, 0)">
</textarea>
然而,文本区域的右下角仍有一些倾斜的线条是我无法去除的!此外,当文本区域处于焦点状态时,边框会重新出现。如何使文本区域完全透明?
我可以通过以下方式使文本框(部分)的背景和边框透明 -
<textarea id="one" style="background-color: rgba(0, 0, 0, 0); border-color: rgba(0, 0, 0, 0)">
</textarea>
然而,文本区域的右下角仍有一些倾斜的线条是我无法去除的!此外,当文本区域处于焦点状态时,边框会重新出现。如何使文本区域完全透明?
将resize属性设置为none
<textarea id="one" style="resize: none;background-color: rgba(0, 0, 0, 0); border-color: rgba(0, 0, 0, 0)">
</textarea>
#one {
background: none; // no bg means already transparent if no color wanted
border: none; // no border , but if exist add !important to style
}
你只需要将边框和背景设置为none,而不是使用rgba(0, 0, 0, 0)。
outline: none
来移除边框。 - SerVB