隐藏select边框及下接箭头方法

故事扮演 提交于 2020-01-27 08:40:40

代码:

/*套在Select外层,用于隐藏Select框*/
.DivSelect
{
    position
: relative;
    background-color
: transparent;
    width
:  140px;
    height
: 17px;
    overflow
: hidden; /*隐藏了小三角,因为宽度为110px,而select宽度为130px*/
    border-width
:0px;
    border-top-style
: none; 
    border-right-style
: none; 
    border-left-style
: none; 
    border-bottom-style
: none;
}

/*设置Select样式*/
.SelectList
{
    position
: relative;
    background-color
: transparent;
    TOP
:   -2px;
    left
:-2px;
    border-width
: 0px;
    border-top-style
: none; 
    border-right-style
: none; 
    border-left-style
: none; 
    border-bottom-style
: none;
    width
:160px;
    display
:block;
    height
: 18px;
    overflow
:hidden;
}

 

                            <div class="DivSelect">
                                
<select class="SelectList">
                                    
<option>aaaa</option>
                                    
<option>aaaa</option>
                                    
<option>aaaa</option>
                                    
<option>aaaa</option>
                                
</select>
                            
</div>

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!