圆润的边角,长方形按钮 [英] Rounded corner, rectangle buttons

查看:206
本文介绍了圆润的边角,长方形按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我感兴趣的是类似于在 HTTPS的网页中找到的一个html按钮://new.myspace。 COM / 。我知道HTML是这样的:

I am interested in making an html button similar to the ones found on the homepage of https://new.myspace.com/. I know that the html would look like this:

 <button class="button" id="join">Join</button>

虽然我不知道对CSS的应该是什么样子。我知道有很多教程网上关于HTML按钮,但我不知道半矩形的。谢谢,哈里森

Although I'm not sure on what the css should look like. I know there are many tutorials online about html buttons, but I'm not sure about semi-rectangular ones. Thanks, Harrison

推荐答案

使用边界半径。该示例中的确切code是边界半径:4PX;
https://developer.mozilla.org/en-US/docs/CSS /边界半径

Use border-radius. The exact code in that example is border-radius: 4px; https://developer.mozilla.org/en-US/docs/CSS/border-radius

随着杰克的好建议,请使用此捕获所有浏览器的规则:

Following Jake's good advices, use this catch-all-browser rules:

button#join {
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
}

这篇关于圆润的边角,长方形按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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