按钮边框颜色问题 [英] Button Border Color Issues

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

问题描述

我使用以下HTML和CSS代码创建了一个按钮。



  .btnstyle2 {height:28px; text-align:center; background-color:#F8F8F8; border-radius:3px;边框颜色:#E8E8E8; }  

 < button type =buttonclass = btnstyle2>关闭< / button>  

已经摆脱了比左边界和上边界更暗的右边界和下边界。我需要按钮的整个边框为CSS代码中指定为浅灰色的边框颜色:#E8E8E8。任何帮助将是伟大的!谢谢!

解决方案

按钮使用默认样式。



您可以将宽度,样式和颜色的边框声明合并到一行中,如下所示:

b
$ b

  .btnstyle2 {height:28px; text-align:center; background-color:#F8F8F8; border-radius:3px; border:2px solid#E8E8E8;}  

< button type =buttonclass =btnstyle2>关闭< / button>

I have created a button with the following HTML and CSS code.

.btnstyle2{
    height: 28px;
    text-align: center;
    background-color: #F8F8F8;
    border-radius: 3px;
    border-color: #E8E8E8;
    
}

<button type="button" class="btnstyle2">Dismiss</button>

The issues I am having is getting rid of the right and bottom borders that are darker than the left and top borders. I need the entire border for the button to be the light gray that is stated in the CSS code as border-color: #E8E8E8. Any help would be great! Thanks!

解决方案

The button is using the default styling. By setting the border to solid will override the default styles.

You can combine the border declaration of width, style and colour into one line like so:

.btnstyle2{
    height: 28px;
    text-align: center;
    background-color: #F8F8F8;
    border-radius: 3px;
    border: 2px solid #E8E8E8;
}

<button type="button" class="btnstyle2">Dismiss</button>

这篇关于按钮边框颜色问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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