如何在HTML中设置按钮的大小 [英] How to set the size of button in HTML

查看:1457
本文介绍了如何在HTML中设置按钮的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的纯HTML / JS页面上有一些按钮。
当页面在浏览器中打开时,按钮大小是正常的。
但在刷新/重新加载页面上,按钮大小会减小。
实际上,我没有设置按钮的文本值。该按钮的文本是空白的。
不管文本大小如何,我应该如何设置HTML按钮的大小?

解决方案

意思就像是
$ b

HTML

 < button class =test>< / button> 

CSS

  .test {
height:200px;
width:200px;如果您想避免使用CSS ,请参阅

一个href =http://jsfiddle.net/JfV4A/2/>这个:

 < button style =height:200px; width:200px>< / button> 


I have some buttons on my pure HTML/JS page. When the page is opened in browser, the button size is normal. But on refresh/reloading page, the button size is reduced. In fact, I have not set the button text value. The button's text is blank. How should I set the size of my button in HTML irrespective to the size of the text?

解决方案

Do you mean something like this?

HTML

<button class="test"></button>

CSS

.test{
    height:200px;
    width:200px;
}

If you want to avoid CSS, see this:

<button style="height:200px;width:200px"></button>

这篇关于如何在HTML中设置按钮的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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