Place a non editable percentage sign within a HTML input field

前端 未结 4 1696
慢半拍i
慢半拍i 2021-01-02 18:01

I currently have a series of input field boxes which are numerical based. The trouble I am having is adding a \'%\' symbol at the end of each box. Ultimately i want the % sy

4条回答
  •  北海茫月
    2021-01-02 18:30

    Assuming that you're going to put these elements within a relative positioned div, you could handle it this way:

    HTML:

    %

    CSS:

    
    

    Notice that I'm using Bootstrap grid classes (col-md-6), which already gave that div relative positioning. If that's not your case, set relative positioning to your div.

提交回复
热议问题