Html 更改按钮标签边框颜色

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4553007/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 05:53:31  来源:igfitidea点击:

changing button tag border color

html

提问by rashmi

I have put an image in border-less buttontag. When the button is selected with Tab, a brown border appears around the image. How do I change color of that rectangle from brown to white. Is is possible to have a white rectangle with inner and outer shadow of blue.

我在无边框button标签中放置了一个图像。使用 选择按钮时Tab,图像周围会出现棕色边框。如何将该矩形的颜色从棕色更改为白色。是否可能有一个白色矩形,内部和外部阴影为蓝色。

HTML

HTML

<td align=center valign=middle>
  <figure>
    <button style="background-color:black; height:160px;width:160px ; border:none">
        <img src="F:\rashmi\icons_tv\Help_Normal.png">
    </button>
    <figcaption><font size="5" color="white" style="font-weight:bold"><center>help</center></font>

    </figcaption>
  </figure>
</td>

EDIT:

编辑:

I can change highlight color by using style=outline-color:white

我可以通过使用更改高亮颜色 style=outline-color:white

HTML

HTML

<html>

    <body>
        <tr>
            <td align=center valign=middle>
                <figure>
                    <button style="background-color:black; height:160px;width:160px ; border:none;outline-color:white;">
                        <img src="F:\rashmi\icons_tv\Help_Normal.png">
                    </button>
                    <figcaption><font size="5" color="white" style="font-weight:bold"><center>help</center></font>

                    </figcaption>
                </figure>
            </td>
            <td align=center valign=middle>
                <figure>
                    <button style="background-color:black; height:160px;width:160px ; border:none;outline-color:white;">
                        <img src="F:\rashmi\icons_tv\Help_Normal.png">
                    </button>
                    <figcaption><font size="5" color="white" style="font-weight:bold"><center>help</center></font>

                    </figcaption>
                </figure>
            </td>
        </tr>
    </body>

</html>

Here is my initial page load image and if I press TabI get a highlight similar to what is shown

这是我的初始页面加载图像,如果我按下,Tab我会得到一个类似于显示的突出显示

How do I increase the rectangle width.

如何增加矩形宽度。

回答by Sandy

<input type="button"

    value="Button with border"

    style="color: #07c;

        border: 2px solid #07c;

        padding: 2px 5px;" />

Visit this linkfor more details.

访问此链接了解更多详情。

回答by adweb24.com

enter image description here

在此处输入图片说明

[custom_button text="Custom Button" title="Custom Button" url="http://www.your_link_goes_here..." size="medium" bg_color="#FF5C00" text_color="#FFFFFF" align="left" target="_self"]