Select with double triangle selection

I believe that some programmers will encounter some various needs. Today I have encountered a strange demand. This is related to the choice of style!

I believe that many developers have encountered a situation.The same is the selection of the drop-down selection box.The style displayed by the ios system and the windows system is not the same. To windows, it is indeed a single triangle selection (Xiaobian also admits that the choice of double triangles looks bg high), today I edited a double triangle style select drop-down selection box!
Drop-down selection box
Next is the code: The style, you can find the component directly to use it is of course the best! Xiaobian did not find the corresponding component, so I wrote it hard!)

<!DOCTYPE html>
<html>
<style>
	.ss{
    width:100%;
    height:40px;
    line-height:40px;
    border: solid 1px #000;
    appearance:none;
    -moz-appearance:none; 
    -webkit-appearance:none;
    }
    select::-ms-expand { display: none; } 
    .aa{
    	float:right;
        z-index:999;
        height:14px;
        line-height:14px;
        position:relative;
        margin-top:-27px;
        margin-right:10px;
    }
    .mm{
    	width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 5px solid black;
    }
    .bb{
    	width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 5px solid black;
        margin-top:4px;
    }
</style>
<body>

<select name="cars"  class="ss">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="fiat">Fiat</option>
<option value="audi">Audi</option>
</select>
<div class="aa">
<div class="mm"></div>
<div class="bb"></div>
</div>
</body>
</html>

Hope it helps everyone!

Published 34 original articles · won praise 0 · Views 3634

Guess you like

Origin blog.csdn.net/qq_43469899/article/details/103404326