Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何自定义HTML提交按钮?_Html_Css_Xhtml_Submit Button - Fatal编程技术网

如何自定义HTML提交按钮?

如何自定义HTML提交按钮?,html,css,xhtml,submit-button,Html,Css,Xhtml,Submit Button,如何使提交按钮显示为纯文本,以覆盖默认的浏览器按钮样式 我在互联网上搜索过,但我找到的只是如何为提交按钮放置图像。您需要背景色:透明(或者您也可以使用hex和边框:0,将获得所需的结果 input[type="submit"].plain { border: 0; background: transparent; /* Or whatever background color you want to use */ } 你可以在这里找到一个例子: 您可以将其设计成这样,然后对其

如何使提交按钮显示为纯文本,以覆盖默认的浏览器按钮样式


我在互联网上搜索过,但我找到的只是如何为提交按钮放置图像。

您需要
背景色:透明
(或者您也可以使用
hex
边框:0,将获得所需的结果

input[type="submit"].plain {
    border: 0;
    background: transparent; /* Or whatever background color you want to use */
}

你可以在这里找到一个例子:


您可以将其设计成这样,然后对其进行必要的调整,使其适合您设计的其他部分

input[type=submit]{
    border: 0px;
    background: inherit;
    padding: 0;
}

背景:继承是为了确保它符合您的原始背景颜色。

当然可以,但这样做的过程是什么?请看。感谢您简单而快速的回答。我如何使光标变成一只手,指示它处于活动状态?@HeyItsProdigy使用
光标:指针或如果您想处于活动状态,请使用
:active
而不是
:hover
input[type=submit]{
    border: 0px;
    background: inherit;
    padding: 0;
}