.Filter_title { width:840px; } .Filter_title .left { float:left; margin-top:13px; margin-right:0px; } .Filter_title .F_jl { float:right; color:#999; margin-top:10px; padding-right:5px; } .select_moni { display:inline-block; margin-top:11px; } .select_contant { float:left; } .select_contant .contant { height:20px; line-height:25px; display:inline-block; border:none; cursor:pointer; font-size:12px; color:#666; outline:none; padding:10px; padding:0px 20px 0px 0px; margin:0px; width:auto; margin-right:15px; } .select_contant .contant:hover { } .select_contant .options { display:none; width:auto; position:absolute; background:#fff; border:1px solid #666; border:1px solid #dcd6d6; border-radius:4px; } .select_contant .options p { font-size:12px; color:#666; padding:2px 20px; } .select_contant .options p:hover { background:#39a5fb; cursor:pointer; color:#fff; } .qiu:hover { }
开始写一个select根据选项自适应宽度的,现在自定义的div不仅能自适应选项宽度,而且可以设置选项之间的距离,解决了option的没办法设置高度的问题