简体   繁体   English

如何创建一个小按钮?

[英]How to create a tiny button?

I have a need to create a tiny button but I cannot do that with its width. 我需要创建一个小按钮,但不能用它的宽度做到这一点。 It seems that button's width has a minimum value. 似乎按钮的宽度具有最小值。 When I set its height is 5px and width is 5px, it's OK in Visual Studio but when it's rendered in Web browsers, only its height is right. 当我将其高度设置为5px且宽度为5px时,在Visual Studio中可以,但在Web浏览器中呈现时,仅其高度是正确的。

Do you know how to set button's width to a small very? 您知道如何将按钮的宽度设置得很小吗?

Try setting the padding to 0. 尝试将填充设置为0。

padding: 0px; 

Browsers by default add padding. 浏览器默认情况下添加填充。 It also varies from browser to browser. 随浏览器的不同而不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM