Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.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 显示<的Css样式;a>;as按钮_Html_Css - Fatal编程技术网

Html 显示<的Css样式;a>;as按钮

Html 显示<的Css样式;a>;as按钮,html,css,Html,Css,下面给出了的Css样式: a { padding: 10px 15px; background: #4479BA; color: #FFF; } 我想把它显示为按钮样式。我见过很多css,但我只想要默认的按钮css 有人能给我建议一个方法吗。谢谢 <a heref="#">A tag button</a>​ a{ font-family: Arial, Helvetica, sans-serif; font-size: 1

下面给出了
的Css样式:

a {
    padding: 10px 15px; 
    background: #4479BA; 
    color: #FFF;
}
我想把它显示为按钮样式。我见过很多css,但我只想要默认的按钮css

有人能给我建议一个方法吗。谢谢

<a heref="#">A tag button</a>​

a{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #ffffff;
    padding: 10px 20px;
    background: -moz-linear-gradient(
        top,
        #6b6b6b 0%,
        #000000);
    background: -webkit-gradient(
        linear, left top, left bottom, 
        from(#6b6b6b),
        to(#000000));
    -moz-border-radius: 30px;
    -webkit-border-radius: 30px;
    border-radius: 30px;
    border: 1px solid #000000;
    -moz-box-shadow:
        0px 1px 3px rgba(115,110,115,0.5),
        inset 0px 0px 1px rgba(255,255,255,0.7);
    -webkit-box-shadow:
        0px 1px 3px rgba(115,110,115,0.5),
        inset 0px 0px 1px rgba(255,255,255,0.7);
    box-shadow:
        0px 1px 3px rgba(115,110,115,0.5),
        inset 0px 0px 1px rgba(255,255,255,0.7);
    text-shadow:
        0px -1px 0px rgba(000,000,000,0.4),
        0px 1px 0px rgba(255,255,255,0.3);
}
​
下面是为按钮生成css的最佳工具

这里是生成css供按钮使用的最佳工具

a{
  appearance: button; /* CSS3 */    
  -webkit-appearance: button; /* Safari and Chrome */
  -moz-appearance: button; /* Firefox */
  -ms-appearance: button; /* Internet Explorer */
  -o-appearance: button; /* Opera */
  cursor: default;
}
是一个现场演示

这是一个CSS3属性。请参阅下表

如果你想要一个看起来像按钮的CSS按钮,而不是使用CSS3,这有点难:(.但是你可以参考教程。但是如果你想要默认HTML按钮的确切外观,那么你可以使用一个看起来像那样的图像。

使用

a{
  appearance: button; /* CSS3 */    
  -webkit-appearance: button; /* Safari and Chrome */
  -moz-appearance: button; /* Firefox */
  -ms-appearance: button; /* Internet Explorer */
  -o-appearance: button; /* Opera */
  cursor: default;
}
是一个现场演示

这是CSS3属性。请参阅下表


如果你想要一个看起来像按钮的CSS按钮,而不是使用CSS3,这有点难:(。但是你可以参考教程。但是如果你想要默认HTML按钮的精确外观,那么你可以使用一个看起来像这样的图像。

你可以使用以下CSS作为锚定:

a {
     appearance:button; /* For Good Browsers */
     -moz-appearance:button; /* For Firefox */
     -webkit-appearance:button; /* For Safari and Chrome */

     padding: 5px 15px; 
     color: #000;
     text-decoration: none;
}​

您可以将以下CSS用于锚定:

a {
     appearance:button; /* For Good Browsers */
     -moz-appearance:button; /* For Firefox */
     -webkit-appearance:button; /* For Safari and Chrome */

     padding: 5px 15px; 
     color: #000;
     text-decoration: none;
}​


我们可以帮助解决您的问题,而不是做您的工作。@user1656416您到底想做什么?padding:10px 15px;background:#4479BA;color:#FFF;and!我非常喜欢答案,我不知道有“外观”css属性。我们可以帮助解决您的问题,而不是做您的工作。@user1656416您到底是什么正在尝试做什么?填充:10px 15px;背景:#4479BA;颜色:#FFF;和!我非常喜欢这个答案,我不知道有一个“外观”css属性。OP需要默认按钮样式。你可以使用不同颜色来设置默认样式在我的答案或blasteralfred的答案中查看演示以查看默认按钮视图。OP需要默认按钮样式ling.您可以使用不同颜色来设置默认样式在我的答案或blasteralfred的答案中查看演示,以查看默认按钮视图。我将其添加到了答案中。检查。
-ms外观
适用于IE10+它在IE9及以下版本中不起作用。是的,我知道。为我的答案添加更多详细信息:)我在回答中添加了这一点。检查。
-ms外观
适用于IE10+它在IE9及以下版本中不起作用。是的,我知道。在我的回答中添加更多详细信息:)