set the width of select2 input (through Angular-ui directive)

前端 未结 12 1811
名媛妹妹
名媛妹妹 2020-12-22 20:14

I have problem making this plunkr (select2 + angulat-ui) work.

http://plnkr.co/edit/NkdWUO?p=preview

In local setup, I get the select2 work, but I cannot set

12条回答
  •  难免孤独
    2020-12-22 20:56

    Easier CSS solution independent from select2

    //HTML
    
    
    
    //CSS
    .input-xxsm {
      width: 40px!important; //for 2 digits 
    }
    
    .input-xsm {
      width: 60px!important; //for 4 digits 
    }
    
    .input-sm {
      width: 100px!important; //for short options   
    }
    
    .input-md {
      width: 160px!important; //for medium long options 
    }
    
    .input-lg {
      width: 220px!important; //for long options    
    }
    
    .input-xlg {
      width: 300px!important; //for very long options   
    }
    
    .input-xxlg {
      width: 100%!important; //100% of parent   
    }
    

提交回复
热议问题