2017-09-28 71 views
1

我有一个问题,不知道如何解决。我有联系表7的形式,看起来像这样:如何从联系表格7中删除顶部,右侧和左侧边框?

enter image description here

并希望删除顶部,左侧和右侧边框的领域,所以看起来就像这样:

enter image description here

所以我的问题是需要做些什么才能获得这样的外观?我在谷歌搜索和Stackoverflow回答了问题,但没有找到像我这样更接近的问题。这是控制该部分的代码:

.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-text, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-number, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-date, 
.cf7_custom_style_1 textarea.wpcf7-form-control.wpcf7-textarea, 
.cf7_custom_style_1 select.wpcf7-form-control.wpcf7-select, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-quiz{ 
    border-color: #949494; 
    border-width: 1px; // Probably something here need to be changed? 
    border-style: outset; 
    color: #949494; 
    font-family: Raleway; 
    padding-top: -2px; 
    padding-bottom: -2px; 
    } 

任何帮助?

回答

2

尝试:

.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-text, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-number, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-date, 
.cf7_custom_style_1 textarea.wpcf7-form-control.wpcf7-textarea, 
.cf7_custom_style_1 select.wpcf7-form-control.wpcf7-select, 
.cf7_custom_style_1 input.wpcf7-form-control.wpcf7-quiz{ 
    border: none; 
    border-bottom-color: #949494; 
    border-bottom-width: 1px; // Probably something here need to be changed? 
    border-bottom-style: outset; 
    color: #949494; 
    font-family: Raleway; 
    padding-top: -2px; 
    padding-bottom: -2px; 
    } 

这将删除除底部以外的边框。

1

您可以独立控制箱模型的每个尺寸。

border-right-width: 0px; 
border-top-width: 0px; 
border-left-width: 0px; 
1

如果你能改写这个风格,更好的方法是定义只有底边框,这样的:

div { 
 
    width: 100px; 
 
    height: 100px; 
 
    background-color: violet; 
 
    border-bottom: 5px black solid; 
 
}
<div></div>

如果没有,你需要删除不必要的边界(顶部,左侧和右侧)。你可以这样说:

border-top: none; 
border-left: none; 
border-right: none; 

或者,如果它不会工作,你必须添加!important标志来掌管:

border-top: none !important; 
border-left: none !important; 
border-right: none !important; 

小演示:

div { 
 
    width: 100px; 
 
    height: 100px; 
 
    background-color: violet; 
 
    border: 5px black solid; 
 
    border-top: none; 
 
    border-left: none; 
 
    border-right: none; 
 
}
<div></div>

相关问题