使用html提交按钮获取CSS问题

时间:2013-11-08 08:37:14

标签: html css css3 button

我已经从此网站cssportal.com创建了CSS按钮,但在添加到我的网站后,我与原始创建的内容不同。为什么我从左边和顶边边界。

原始视图:

enter image description here

但目前我得到了这个:

enter image description here

我的小提琴:Sample

5 个答案:

答案 0 :(得分:1)

您忘记删除原始浏览器边框: http://jsfiddle.net/xm73g/2/

border: 0px;

答案 1 :(得分:1)

JsFiddle Demo

它是按钮的基本样式,因为按钮就像你的光标一样按下它并再次回到原来的位置。

请为您的按钮样式添加border:none;

答案 2 :(得分:1)

border: 0;提供给CSS ...

预览

普通和悬停版本:

小提琴:http://jsfiddle.net/xm73g/3/

.wpcf7-submit {
    font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bold;
    color: #FFFFFF !important;
    font-size: 15px;
    text-shadow: 1px 1px 0px #3498DB;
    text-transform:uppercase;
    padding: 10px 40px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    border: 0;
    background: #3498DB;
    background: linear-gradient(top, #3498DB, #3498DB);
    background: -ms-linear-gradient(top, #3498DB, #3498DB);
    background: -webkit-gradient(linear, left top, left bottom, from(#3498DB), to(#3498DB));
    background: -moz-linear-gradient(top, #3498DB, #3498DB);
}

答案 3 :(得分:0)

也将边框:0添加到按钮,它将起作用

答案 4 :(得分:0)

添加border:none;在这样的css代码中:

.wpcf7-submit {
    font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bold;
    border:none;
    color: #FFFFFF !important;
    font-size: 15px;
    text-shadow: 1px 1px 0px #3498DB;
    text-transform:uppercase;
    padding: 10px 40px;
    -moz-border-radius: 4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    background: #3498DB;
    background: linear-gradient(top, #3498DB, #3498DB);
    background: -ms-linear-gradient(top, #3498DB, #3498DB);
    background: -webkit-gradient(linear, left top, left bottom, from(#3498DB), to(#3498DB));
    background: -moz-linear-gradient(top, #3498DB, #3498DB);
}
.wpcf7-submit:hover {
    color: #FFFFFF !important;
    border:none;
    background: #468CCF;
    background: linear-gradient(top, #468CCF, #63B8EE);
    background: -ms-linear-gradient(top, #468CCF, #63B8EE);
    background: -webkit-gradient(linear, left top, left bottom, from(#468CCF), to(#63B8EE));
    background: -moz-linear-gradient(top, #468CCF, #63B8EE);
}