CSS按钮是网站设计中极其常见的元素,而每个按钮在没有被特别定义的情况下都有着默认的属性值。
button, input[type="button"], input[type="submit"] {display: inline-block;padding: 0.5em 1em;font-size: 1em;font-family: inherit;font-weight: bold;color: #fff;background-color: #333;border: none;border-radius: 0.2em;cursor: pointer;text-align: center;text-decoration: none;line-height: normal;vertical-align: middle;}以上代码是CSS按钮的默认属性值,其中包括按钮的字体大小、颜色、样式、背景色以及边框半径等。
需要注意的是,这里的按钮类型包括button元素、input元素的button类型和submit类型。
当然,如果我们想要自定义按钮的样式,可以通过在CSS中重新定义相关属性来实现,具体方法可以在W3School中找到。
上一篇:css按钮靠右对齐
下一篇:javascript中字符串处理函数









