最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Make a perfectly transparent textarea - Stack Overflow

programmeradmin3浏览0评论

I can make the background and borders (partially) of a textarea transparent by doing -

<textarea id="one" style="background-color: rgba(0, 0, 0, 0); border-color: rgba(0, 0, 0, 0)">
</textarea>

However, there is still a couple of slanting lines in the bottom right corner of the textarea which I cannot remove! Also, border of textarea reappears when textarea is in focus.

How can I make a perfectly transparent textarea?

I can make the background and borders (partially) of a textarea transparent by doing -

<textarea id="one" style="background-color: rgba(0, 0, 0, 0); border-color: rgba(0, 0, 0, 0)">
</textarea>

However, there is still a couple of slanting lines in the bottom right corner of the textarea which I cannot remove! Also, border of textarea reappears when textarea is in focus.

How can I make a perfectly transparent textarea?

Share Improve this question asked Apr 29, 2016 at 4:13 vjjjvjjj 1,0693 gold badges15 silver badges39 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

Set the resize to 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
}

hi just make border to none and background to none rather then making rgba(0, 0, 0, 0).

发布评论

评论列表(0)

  1. 暂无评论