.custom-select{position:relative;宽度:100%;文本对齐:左;大纲:无;高度:47px;line-height:47px;}.selected{background-color:#080D0E;边界半径:6px;边框:1px实心#858586;颜色:#ffffff;左填充:8px;游标:指针;user-select:none;}.selected.open{border:1pxsolid#CE9B2C;border-radius:6px6px0px0px;}.selected:after{position:absolute;内容:””;顶部:22px;右:10px;宽度:0;高度:0;边框:4px实心透明;边框颜色:#fff透明透明透明;}.items{颜色:#ffffff;边框半径:0px0px6px6px;溢出:隐藏;border-right:1pxsolid#CE9B2C;border-left:1pxsolid#CE9B2C;border-bottom:1pxsolid#CE9B2C;位置:绝对;背景色:#080D0E;左:0;右:0;}.item{颜色:#ffffff;左填充:8px;游标:指针;用户选择:无;}.item:悬停{背景色:#B68A28;}.selectHide{display:none;}作者:LaneWagner难度。有时,如果不结合使用样式化的div和自定义JavaScript来构建您自己的div,那是不可能的。在本文中,您将学习如何构建具有完全自定义CSS样式的Vue.js组件。演示:https://codesandbox.io/s/cust...HTML{{selected}}