html 菜单 下拉 三角,html – CSS – 将下拉箭头更改为unicode三角形

也许是这样?

*,

*:before,

*:after {

box-sizing: border-box;

}

* {

padding: 0;

margin: 0;

}

form {

padding: 1rem;

max-width: 400px;

margin: 1em auto;

}

.select {

height: 40px;

width: 100%;

overflow: hidden;

position: relative;

border-radius: 3px;

margin-bottom: 1em;

}

.select:after {

content: "▼";

padding: 12px 8px;

position: absolute;

right: 10px;

top: 0;

z-index: 1;

text-align: center;

width: 10%;

height: 100%;

pointer-events: none;

}

.select__field {

height: 40px;

width: 100%;

padding: 5px 15px;

color: #616263;

background-color: #ececec;

border: 1px solid #e3e3e3;

outline: none;

font-size: 16px;

-webkit-appearance: none;

/* for webkit browsers */

-moz-appearance: none;

/* for firefox */

appearance: none;

/* for modern browsers */

}

/* remove default caret for ie */

.select__field::-ms-expand {

display: none;

}

.select__field:focus:invalid {

border-color: #FD6347;

}

.select__field:required:valid {

border-color: #006400;

}

.btn-submit {

color: #fff;

display: block;

padding: 15px;

text-transform: uppercase;

background: #535C69;

width: 100%;

border: none;

border-radius: 3px;

}

Choose option ...

Option 1

Option 2

Option 3

Option 4

Option 5

Option 6

Submit

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值