I am trying to write css which, for the whole line that I can add, will increase these lines by about 3px. I don’t know how I can do this, I think something like this:
.increaseSize { getSize()+3px; }
Can anybody help me?
I would like to look for a different and much simpler approach.
p.myText { font-size: 16px; } .increaseSize { font-size: 1.5em }
<p class="myText">This is some standard text and <span class="increaseSize">this is a bigger font size text</span></p>
This will make the .increaseSize element 50% larger than its parent.
You can use the calc () function, but maybe browser compatibility is a problem. This is a safer solution.
Does this help you?
You can use it, as in the following example:
div { font-size: 1em; } span.increase { font-size: calc(100% + 3px); }
<div> Hello <span class="increase">World</span> </div>
% . calc ( ), 3px font-size.
%
calc
3px
font-size
font-size -. / , em, rem % font-size.
em
rem
W3C
Em ( ), em .em W3C.1em . > 16 . , 1em 16px.em : pixels/16 = em
Em ( ), em .
em W3C.
1em . > 16 . , 1em 16px.
em : pixels/16 = em
h1 { font-size: 2.5em; /* 40px/16=2.5em */ } h2 { font-size: 1.875em; /* 30px/16=1.875em */ } p { font-size: 0.875em; /* 14px/16=0.875em */ }
Source: https://habr.com/ru/post/1680700/More articles:Numpy float32 и сравнение с плавающей точкой - pythonPrint numpy.float64 with full precision - pythonJenkins Android Emulator - androidIs it possible to associate a django user account with one specific workstation? - pythonGrouping and removing from the list - listWhat is the difference between importScripts and ES6 / import modules? - es6-modulesUIViewController view with transparent background in swift 3.0 - swift3Cloud function completed successfully, but notification does not show android - androidОтбрасывать индекс с помощью psycopg2 вступает в силу до или после фиксации? - pythonЧто делает аргумент graph в tf.Session()? - machine-learningAll Articles