html实现下拉框、switch开关、复选框效果

1、下拉框,效果如下图所示:

html实现下拉框、switch开关、复选框效果

代码:

<style> .selectBox { width: 90px; margin: 50px; } .select { width: 90px; background-color: #17a6b5; height: 40px; cursor: pointer; display: flex; justify-content: center; align-items: center; border-radius: 3px; } .select img { width: 20px; cursor: pointer; transition: all 0.5s; } .selectOption { background-color: #666666; width: 90px; list-style: none; padding-left: 0; margin-top: 0; display: none; } .selectOption li { width: 100%; color: #ffffff; text-align: center; cursor: pointer; } .selectOption li:hover { background-color: #17a6b5; } </style>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zgjwdd.html