开发者

Can I style an input button to be just a rectangle with a border?

开发者 https://www.devze.com 2023-03-05 06:34 出处:网络
I would like to style my input buttons to take away all the normal styling and just make them into rectangles with rounded edges. I\'m new开发者_JAVA技巧 to CSS. Can someone tell me if it\'s possible

I would like to style my input buttons to take away all the normal styling and just make them into rectangles with rounded edges. I'm new开发者_JAVA技巧 to CSS. Can someone tell me if it's possible to do this.

John


Yea, sure.

input[type=submit], input[type=button], button {
    border: 1px solid #000;
    background: #f00;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
}

There you go.

http://jsfiddle.net/4fW4y/

Example with more bells and whistles:

http://jsfiddle.net/4fW4y/1/

And yea, as Jeroen noted, the fancier effects are supported only in modern browsers.

0

精彩评论

暂无评论...
验证码 换一张
取 消