简体   繁体   中英

How to modify font-size in simple form

<style>

.mobile_note_form2 {
    font-size: 30px;
}    

</style>

<div class="mobile_note_form2">
<fieldset>
    <%= f.date_select :created_at %><br/><br/>
  <%= f.text_area :note %><br/>
  <%= f.check_box :_destroy %>
  <%= f.label :_destroy, "Remove Note"  %>

</fieldset>
</div>

I want to make the "Remove Note" label with a font-size of 30px, but can't seem to figure out how to change styles in simple form.

use span with a class and use that class to set the font-size .

<span class="largeFont" ><%= f.label :_destroy, "Remove Note"  %></span>

CSS:

.largeFont
{
   font-size : 30px;
}

Remove class mobile_note_form2 from the div . It is causing all the elements to have font-size : 30px

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM