3

我有一个文本输入,但顶部和左侧边框的颜色不正确,这是为什么,我该如何解决?

http://jsfiddle.net/9ehBs/

HTML

<input type="text" class="searchbox" />

CSS

.searchbox
{
    width: 200px;
    height: 30px;
    padding: 10px;
    font-size: 28px;
    font-weight: 900;
    font-family: Ebrima;
    color: rgb(54,54,54);
    border-width: 13px;
    border-color: rgb(46,94,115);
    float: left;
    margin-left: 10px;
    margin-top: 10px;
}
4

3 回答 3

4

你需要border-style: solid. 查看您更新的小提琴。

使用速记会更有效率,即border: 13px solid rgb(46,94,115);

于 2013-09-22T21:37:29.420 回答
1
border: 13px solid rgb(46,94,115);

连续更容易......希望它有所帮助

于 2013-09-22T21:39:58.720 回答
0
.searchbox
{
    width: 200px;
    height: 30px;
    padding: 10px;
    font-size: 28px;
    font-weight: 900;
    font-family: Ebrima;
    color: rgb(54,54,54);
    border-width: 13px;
    border-style: solid;/* add this to your css options: dotted | solid | dashed */
    border-color: rgb(46,94,115);
    float: left;
    margin-left: 10px;
    margin-top: 10px;
}

速写:

margin: 10px 0 0 10px; /*(top, right and left, bottom)*/
border:13px solid rgb(46,94,115);

...代替

margin-left: 10px;
margin-top: 10px;
margin-right: 0px;
margin-bottom: 0px;


border-width: 13px;
border-style: solid;/* add this to your css options: dotted | solid | dashed */
border-color: rgb(46,94,115);
于 2013-09-22T21:46:14.073 回答