在javascript或css中的圆角文本区域框 [英] round corners text area box either in javascript or in css

查看:76
本文介绍了在javascript或css中的圆角文本区域框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以建议我使用javascript或css中的圆角文本区域框

can anyone suggest me for a round corners text area box either in javascript or in css

推荐答案

经典方式要做到这一点,在textarea周围的div上使用背景图像,并将textarea的边框/轮廓设置为无,如下所示:

A "classic" way to do this, is using a background-image on a div around the textarea and setting border/outline of the textarea to none, like this:

<div style="background-image: url(image/with/rounded/corners.png);">
    <textarea style="border: none; outline: none;">
    </textarea>
</div>

CSS3支持圆角,但不支持,请参阅例如 http://www.css3.info/preview/rounded-border/

CSS3 supports rounded corners, but that is not well supported, see e.g. http://www.css3.info/preview/rounded-border/

编辑:当时的答案是正确的,但IE中的 border-radius 仅支持从版本9开始。

The answer was correct at that time, but border-radius in IE is only supported from version 9 on.

这篇关于在javascript或css中的圆角文本区域框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆