center align css3样式下拉菜单

时间:2016-04-23 14:18:57

标签: html css3 drop-down-menu

我正在使用此示例来设置使用CSS jsfiddle的下拉菜单。

HTML:

.styled-select {
    background: #fff url('http://www.myiconfinder.com/uploads/iconsets/20-20-1383000fade3dbdf3e93972212606011-Arrow.png') no-repeat 10px center;
    height: 31px;
    text-align: center;
    overflow: hidden;
    width: 80%;
    margin-bottom: 15px;
}
.styled-select select {
    background: transparent;
    border: none;
    font-size: 14px;
    height: 31px;
    width: 103%;
    float: left;
    text-align: center;
    /*padding-left:48%*/
}

CSS:

{{1}}

但是文本左对齐而不是居中。有一种方法可以将填充设置为选择标记本身,但不能正确居中文本,以便如何解决这个问题?

0 个答案:

没有答案
相关问题